SyncPermissionOffer

public final class SyncPermissionOffer: Object

This model is used for offering permission changes to other users.

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 offer 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
  • A token which uniquely identifies this offer. Generated by the server.

    Declaration

    Swift

    public dynamic var token: String?
  • The remote URL to the realm.

    Declaration

    Swift

    public dynamic var realmUrl = ""
  • Whether this offer allows the receiver to read from the Realm.

    Declaration

    Swift

    public dynamic var mayRead = false
  • Whether this offer allows the receiver to write to the Realm.

    Declaration

    Swift

    public dynamic var mayWrite = false
  • Whether this offer allows the receiver to manage the access rights for others.

    Declaration

    Swift

    public dynamic var mayManage = false
  • When this token will expire and become invalid.

    Declaration

    Swift

    public dynamic var expiresAt: Date?
  • Construct a permission offer object used to offer permission changes to other users.

    Declaration

    Swift

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

    Parameters

    realmURL

    The URL to the Realm on which to apply these permission changes to, once the offer is accepted.

    expiresAt

    When this token will expire and become invalid. Pass nil if this offer should not expire.

    mayRead

    Grant or revoke read access.

    mayWrite

    Grant or revoked read-write access.

    mayManage

    Grant or revoke administrative access.