db.roles
The db.roles
table is added to the schema when having dexie-cloud-addon applied. Roles can be imported using the cli and then consumed using the db.cloud.roles observable. It is of course also possible to query them using db.cloud.toArray()
etc.
Roles can be used when sharing data with other users by adding an entry into the members table and set the roles attribute of the member.
Every object in this table is of type Role.
The primary key is a compound key of [realmId+name]
, meaning that for every realm, there could only be a single role name. Typical apps only add global roles. Global roles have their realmId
property set to “rlm-public” and can be referred to from members of any realm. It is also possible to create roles local to a single realm, by setting the realmId to the realm it can be used in.
See Also
Dexie Cloud Docs
- Access Control in Dexie Cloud
- Add demo users
- Add public data
- Authentication in Dexie Cloud
- Consistency in Dexie Cloud
- DBPermissionSet
- Dexie Cloud API
- Dexie Cloud CLI
- Dexie Cloud Docs
- Dexie Cloud REST API
- DexieCloudOptions
- Invite
- Limits
- Member
- PersistedSyncState
- Purchase Subscription
- Realm
- Role
- Run Dexie Cloud on Own Servers
- Sharding and Scalability
- SyncState
- UserLogin
- db.cloud.configure()
- db.cloud.currentUser
- db.cloud.currentUserId
- db.cloud.events.syncComplete
- db.cloud.invites
- db.cloud.login()
- db.cloud.logout()
- db.cloud.options
- db.cloud.permissions()
- db.cloud.persistedSyncState
- db.cloud.roles
- db.cloud.schema
- db.cloud.sync()
- db.cloud.syncState
- db.cloud.userInteraction
- db.cloud.usingServiceWorker
- db.cloud.version
- db.cloud.webSocketStatus
- db.members
- db.realms
- db.roles
- dexie-cloud-addon