RLMSyncPermission

@interface RLMSyncPermission : NSObject

A value representing a permission granted to the specified user(s) to access the specified Realm(s).

RLMSyncPermission is immutable and can be accessed from any thread.

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

  • The Realm Object Server path to the Realm to which this permission applies (e.g. “/path/to/realm”).

    Specify “*” if this permission applies to all Realms managed by the server.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull path;
  • The access level described by this permission.

    Declaration

    Objective-C

    @property (nonatomic, readonly) RLMSyncAccessLevel accessLevel;
  • Whether the access level allows the user to read from the Realm.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL mayRead;
  • Whether the access level allows the user to write to the Realm.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL mayWrite;
  • Whether the access level allows the user to administer the Realm.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL mayManage;
  • Create a new sync permission value, for use with permission APIs.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithRealmPath:(nonnull NSString *)path
                                     identity:(nonnull NSString *)identity
                                  accessLevel:(RLMSyncAccessLevel)accessLevel;

    Parameters

    path

    The Realm Object Server path to the Realm whose permission should be modified (e.g. “/path/to/realm”). Pass “*” to apply to all Realms managed by the user.

    identity

    The Realm Object Server identity of the user who should be granted access to the Realm at path. Pass “*” to apply to all users managed by the server.

    accessLevel

    The access level to grant.

  • Create a new sync permission value, for use with permission APIs.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithRealmPath:(nonnull NSString *)path
                                     username:(nonnull NSString *)username
                                  accessLevel:(RLMSyncAccessLevel)accessLevel;

    Parameters

    path

    The Realm Object Server path to the Realm whose permission should be modified (e.g. “/path/to/realm”). Pass “*” to apply to all Realms managed by the user.

    username

    The username (often an email address) of the user who should be granted access to the Realm at path.

    accessLevel

    The access level to grant.

  • The identity of the user to whom this permission is granted, or “*” if all users are granted this permission. Nil if the permission is defined in terms of a key-value pair.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *identity;
  • key

    If the permission is defined in terms of a key-value pair, the key describing the type of criterion used to determine what users the permission applies to. Otherwise, nil.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *key;
  • If the permission is defined in terms of a key-value pair, a string describing the criterion value used to determine what users the permission applies to. Otherwise, nil.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *value;
  • When this permission was last updated.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDate *_Nonnull updatedAt;