RLMSyncPermissionChange
@interface RLMSyncPermissionChange : RLMObject
This model is used for requesting changes to a Realm’s permissions.
It should be used in conjunction with an RLMSyncUser
‘s Management Realm.
See https://realm.io/docs/realm-object-server/#permissions for general documentation.
-
The globally unique ID string of this permission change object.
Declaration
Objective-C
@property (readonly, atomic) NSString *_Nonnull id;
Swift
var id: String { get }
-
The date this object was initially created.
Declaration
Objective-C
@property (readonly, atomic) NSDate *_Nonnull createdAt;
Swift
var createdAt: Date { get }
-
The date this object was last modified.
Declaration
Objective-C
@property (readonly, atomic) NSDate *_Nonnull updatedAt;
Swift
var updatedAt: Date { get }
-
The status code of the object that was processed by Realm Object Server.
Declaration
Objective-C
@property (readonly, atomic, nullable) NSNumber<RLMInt> *statusCode;
Swift
var statusCode: NSNumber? { get }
-
An error or informational message, typically written to by the Realm Object Server.
Declaration
Objective-C
@property (readonly, atomic, nullable) NSString *statusMessage;
Swift
var statusMessage: String? { get }
-
Sync management object status.
Declaration
Objective-C
@property (readonly, atomic) RLMSyncManagementObjectStatus status;
Swift
var status: Int32 { get }
-
The remote URL to the realm.
Declaration
Objective-C
@property (readonly, atomic) NSString *_Nonnull realmUrl;
Swift
var realmUrl: String { get }
-
The identity of a user affected by this permission change.
Declaration
Objective-C
@property (readonly, atomic) NSString *_Nonnull userId;
Swift
var userId: String { get }
-
Define read access. Set to
YES
orNO
to update this value. Leave unset to preserve the existing setting.Declaration
Objective-C
@property (readonly, atomic, nullable) NSNumber<RLMBool> *mayRead;
Swift
var mayRead: NSNumber? { get }
-
Define write access. Set to
YES
orNO
to update this value. Leave unset to preserve the existing setting.Declaration
Objective-C
@property (readonly, atomic, nullable) NSNumber<RLMBool> *mayWrite;
Swift
var mayWrite: NSNumber? { get }
-
Define management access. Set to
YES
orNO
to update this value. Leave unset to preserve the existing setting.Declaration
Objective-C
@property (readonly, atomic, nullable) NSNumber<RLMBool> *mayManage;
Swift
var mayManage: NSNumber? { get }
-
Construct a permission change object used to change the access permissions for a user on a Realm.
Declaration
Objective-C
+ (nonnull instancetype) permissionChangeWithRealmURL:(nonnull NSString *)realmURL userID:(nonnull NSString *)userID read:(nullable NSNumber<RLMBool> *)mayRead write:(nullable NSNumber<RLMBool> *)mayWrite manage:(nullable NSNumber<RLMBool> *)mayManage;
Swift
convenience init(realmURL: String, userID: String, read mayRead: NSNumber?, write mayWrite: NSNumber?, manage mayManage: NSNumber?)
Parameters
realmURL
The Realm URL whose permissions settings should be changed. Use
*
to change the permissions of all Realms managed by the Management Realm’sRLMSyncUser
.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
YES
orNO
to update this value. Leave unset to preserve the existing setting.mayWrite
Define write access. Set to
YES
orNO
to update this value. Leave unset to preserve the existing setting.mayManage
Define management access. Set to
YES
orNO
to update this value. Leave unset to preserve the existing setting.