RLMObjectPrivileges
struct RLMObjectPrivileges {}
A description of the actual privileges which apply to a specific RLMObject.
This is a combination of all of the privileges granted to all of the Roles which the
current User is a member of, obtained by calling -[RLMRealm privilegesForObject:]
on
the Realm.
By default, all operations are permitted, and each privilege field indicates an operation which may be forbidden.
-
If
false
, the current User is not permitted to read this object directly.Objects which cannot be read by a user will appear in a Realm due to that read permissions are transitive. All objects which a readable object links to are themselves implicitly readable. If the link to an object with `read=false` is removed, the object will be deleted from the local Realm.
Declaration
Objective-C
_Bool read : 1
-
If
false
, modifying the fields of this type is not permitted. Write transactions modifying the objects can be performed locally, but any changes made will be reverted by the server.Note that even if this is `true`, the user may not be able to modify the `RLMArray<RLMPermission> *` property of the object (if it exists), as that is governed by `setPermissions`.
Declaration
Objective-C
_Bool update : 1
-
If
false
, deleting this object is not permitted. Write transactions which delete the object can be performed locally, but the server will restore it.It is possible to have `update` but not `delete` privileges, or vice versa. For objects with primary keys, `delete` but not `update` is ill-advised, as an object can be updated by deleting and recreating it.
Declaration
Objective-C
_Bool del : 1
-
If
false
, modifying the privileges of this specific object is not permitted.Object-specific permissions are set by declaring a `RLMArray<RLMPermission> *` property on the `RLMObject` subclass. Modifications to this property are controlled by `setPermissions` rather than `update`. Even if this field is `true`, note that the user will be unable to grant privileges to a Role which they do not themselves have.
Declaration
Objective-C
_Bool setPermissions : 1