Class PermissionUser
A representation of a sync user within the permissions system.
Inherited Members
Namespace: Realms.Sync
Assembly: Realm.Sync.dll
Syntax
[MapTo("__User")]
public class PermissionUser : RealmObject, INotifyPropertyChanged, ISchemaSource, IThreadConfined, NotificationsHelper.INotifiable
Remarks
PermissionUser objects are created automatically for each sync user which connects to a Realm, and can also be created manually if you wish to grant permissions to a user which has not yet connected to this Realm.
Properties
| Improve this Doc View SourceIdentity
Gets the unique Realm Object Server user ID string identifying this user. This will have the same value as Identity.
Declaration
[MapTo("id")]
[PrimaryKey]
[Required]
public string Identity { get; }
Property Value
Type | Description |
---|---|
String |
Role
Gets the user's private role. This will be initialized to a role named for the user's identity that contains this user as its only member.
Declaration
[MapTo("role")]
public PermissionRole Role { get; }
Property Value
Type | Description |
---|---|
PermissionRole |
Roles
Gets the Roles which this user belongs to.
Declaration
[MapTo("roles")]
[Backlink("Users")]
public IQueryable<PermissionRole> Roles { get; }
Property Value
Type | Description |
---|---|
IQueryable<PermissionRole> |
Methods
| Improve this Doc View SourceGet(Realm, String)
Gets or creates a PermissionUser with the specified identity.
Declaration
public static PermissionUser Get(Realm realm, string identity)
Parameters
Type | Name | Description |
---|---|---|
Realm | realm | The Realm instance. |
String | identity | The Realm Object Server user ID. |
Returns
Type | Description |
---|---|
PermissionUser | A PermissionUser instance that can be added to one or more PermissionRoles. |