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 (readonly, nonatomic) NSString *_Nonnull path; -
The access level described by this permission.
Declaration
Objective-C
@property (readonly, nonatomic) RLMSyncAccessLevel accessLevel; -
Whether the access level allows the user to read from the Realm.
Declaration
Objective-C
@property (readonly, nonatomic) BOOL mayRead; -
Whether the access level allows the user to write to the Realm.
Declaration
Objective-C
@property (readonly, nonatomic) BOOL mayWrite; -
Whether the access level allows the user to administer the Realm.
Declaration
Objective-C
@property (readonly, nonatomic) 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
pathThe 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.identityThe 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.accessLevelThe 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
pathThe 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.usernameThe username (often an email address) of the user who should be granted access to the Realm at
path.accessLevelThe 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 (readonly, nonatomic, nullable) NSString *identity; -
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 (readonly, nonatomic, 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 (readonly, nonatomic, nullable) NSString *value; -
When this permission was last updated.
Declaration
Objective-C
@property (readonly, nonatomic) NSDate *_Nonnull updatedAt;
View on GitHub
Install in Dash
RLMSyncPermission Class Reference