PermissionUser

@objc(RealmSwiftPermissionUser)
public class PermissionUser : Object

A representation of a sync user within the permissions system.

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. When creating a PermissionUser manually, you must also manually add it to the “everyone” Role.

  • The unique Realm Object Server user ID string identifying this user. This will have the same value as SyncUser.identity

    Declaration

    Swift

    @objc
    dynamic public var identity: String
  • 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

    Swift

    @objc
    dynamic public var role: PermissionRole?
  • Roles which this user belongs to.

    Declaration

    Swift

    public let roles: LinkingObjects<PermissionRole>