Would this be something you guys recommend to check for the admin role (or any other role for that matter). Anything wrong with this? This would simply check the user calling the method, see if he has that role, and return true if he does, or throw an error if not.
Parse.Cloud.define("isAdmin", async (request) => {
return true
}, {
requireAnyUserRoles: ["admin"]
});
making use of Parse-Server’s validation requireAnyUserRoles.