Realm evaluates roles in order from left to right. A user can only have one role per document, so when Realm finds a role that applies to the current document, it skips evaluating any remaining roles and immediately begins evaluating a role for the next document in the query. As a result, switching the order of the roles in the Realm UI can affect which role the user has.

Please see the Realm Roles documentation for further information on defining roles and permissions.

Did this answer your question?