Moralis help wanted: How to remove an user added to Role table?


I am using the Role table and abilities of the Moralis server.

I can add an user to an earlier created rolename (ex. ‘admin’): via:

  let roleName = 'admin';
  const roleACL = new Moralis.ACL();
  let role = new Moralis.Role(roleName, roleACL);

But how to remove a user from a role?

What is function of the roles relation field?

Items can be removed from a relation via

It functions the same way as relations for objects:

The “roles” relation is for creating “Role Hierarchies”. If a role references other roles through it’s Roles relation it will inherit ALL those roles. See the docs on Role Hierarchies:

1 Like