/// <summary> /// Returns an instance of the Permission Realm owned by the user. /// </summary> /// <remarks> /// This Realm can be used to review access permissions for Realms managed by the user /// and to Realms which the user was granted access to by other users. /// </remarks> /// <param name="user">The user whose Permission Realm to get.</param> /// <returns>A Realm that can be used to inspect access to other Realms.</returns> public static Realm GetPermissionRealm(this User user) { return(user.GetSpecialPurposeRealm("__permission", typeof(Permission))); }
/// <summary> /// Returns an instance of the Management Realm owned by the user. /// </summary> /// <remarks> /// This Realm can be used to control access and permissions for Realms owned by the user. This includes /// giving other users access to Realms. /// </remarks> /// <seealso href="https://realm.io/docs/realm-object-server/#modifying-permissions">How to control permissions</seealso> /// <param name="user">The user whose Management Realm to get.</param> /// <returns>A Realm that can be used to control access and permissions for Realms owned by the user.</returns> public static Realm GetManagementRealm(this User user) { return(user.GetSpecialPurposeRealm("__management", typeof(PermissionChange), typeof(PermissionOffer), typeof(PermissionOfferResponse))); }