SyncPermissionChange

public final class SyncPermissionChange: Object

This model is used for requesting changes to a Realm’s permissions.

It should be used in conjunction with a SyncUser’s management Realm.

See https://realm.io/docs/realm-object-server/#permissions for general documentation.

  • id

    The globally unique ID string of this permission change object.

    Declaration

    Swift

    public dynamic var id = UUID().uuidString
  • The date this object was initially created.

    Declaration

    Swift

    public dynamic var createdAt = Date()
  • The date this object was last modified.

    Declaration

    Swift

    public dynamic var updatedAt = Date()
  • The status code of the object that was processed by Realm Object Server.

    Declaration

    Swift

    public let statusCode = RealmOptional<Int>()
  • An error or informational message, typically written to by the Realm Object Server.

    Declaration

    Swift

    public dynamic var statusMessage: String?
  • Sync management object status.

    Declaration

    Swift

    public var status: SyncManagementObjectStatus
  • The remote URL to the realm.

    Declaration

    Swift

    public dynamic var realmUrl = "*"
  • The identity of a user affected by this permission change.

    Declaration

    Swift

    public dynamic var userId = "*"
  • Define read access. Set to true or false to update this value. Leave unset to preserve the existing setting.

    Declaration

    Swift

    public let mayRead = RealmOptional<Bool>()
  • Define write access. Set to true or false to update this value. Leave unset to preserve the existing setting.

    Declaration

    Swift

    public let mayWrite = RealmOptional<Bool>()
  • Define management access. Set to true or false to update this value. Leave unset to preserve the existing setting.

    Declaration

    Swift

    public let mayManage = RealmOptional<Bool>()
  • Construct a permission change object used to change the access permissions for a user on a Realm.

    Declaration

    Swift

    public convenience init(realmURL: String, userID: String, mayRead: Bool?, mayWrite: Bool?, mayManage: Bool?)

    Parameters

    realmURL

    The Realm URL whose permissions settings should be changed. Use * to change the permissions of all Realms managed by the management Realm’s SyncUser.

    userID

    The user or users who should be granted these permission changes. Use * to change the permissions for all users.

    mayRead

    Define read access. Set to true or false to update this value. Leave unset to preserve the existing setting.

    mayWrite

    Define write access. Set to true or false to update this value. Leave unset to preserve the existing setting.

    mayManage

    Define management access. Set to true or false to update this value. Leave unset to preserve the existing setting.