Permission
public class Permission: Object
A permission which can be applied to a Realm, Class, or specific Object.
Permissions are applied by adding the permission to the RealmPermission singleton
object, the ClassPermission object for the desired class, or to a user-defined
ListRealmPrivileges
, ClassPrivileges
, and
ObjectPrivileges
for details about what each of the properties mean when applied to
that type.
-
The Role which this Permission applies to. All users within the Role are granted the permissions specified by the fields below any objects/classes/realms which use this Permission.
This property cannot be modified once set.
Declaration
Swift
@objc dynamic public var role: PermissionRole?
-
Whether the user can read the object to which this Permission is attached.
Declaration
Swift
@objc dynamic public var canRead = false
-
Whether the user can modify the object to which this Permission is attached.
Declaration
Swift
@objc dynamic public var canUpdate = false
-
Whether the user can delete the object to which this Permission is attached.
This field is only applicable to Permissions attached to Objects, and not to Realms or Classes.
Declaration
Swift
@objc dynamic public var canDelete = false
-
Whether the user can add or modify Permissions for the object which this Permission is attached to.
Declaration
Swift
@objc dynamic public var canSetPermissions = false
-
Whether the user can subscribe to queries for this object type.
This field is only applicable to Permissions attached to Classes, and not to Realms or Objects.
Declaration
Swift
@objc dynamic public var canQuery = false
-
Whether the user can create new objects of the type this Permission is attached to.
This field is only applicable to Permissions attached to Classes, and not to Realms or Objects.
Declaration
Swift
@objc dynamic public var canCreate = false
-
Whether the user can modify the schema of the Realm which this Permission is attached to.
This field is only applicable to Permissions attached to Realms, and not to Realms or Objects.
Declaration
Swift
@objc dynamic public var canModifySchema = false