Back

Database RLS

  • 0
  • Self Hosted
  • Databases
IamtheFuture
21 Sep, 2024, 21:50

How do I set Role Level Access at the Database level

For example I want only users on the members collection to be able to access a workspace collects

Imagine Slack a user from another workspace should not be able to access the db of another workspace, am trying to enforce some security at the db level

TL;DR
Developers are looking to enforce Role Level Access (RLS) at the database level. They want to restrict access to collections based on user roles, similar to how Slack restricts access between workspaces. One solution involves programmatically setting permissions in the "permissions" array when creating a document using the appwrite.io API. This allows developers to control access to specific collections or documents based on user roles.
D5
21 Sep, 2024, 22:26

You add the users to the team, and then you set the permissions in the collection or documents you want when creating it

D5
21 Sep, 2024, 22:26

For example:

D5
21 Sep, 2024, 22:28
D5
21 Sep, 2024, 22:29

You can do that programmatically too when creating a document, specifically in the "permissions" array: https://appwrite.io/docs/references/cloud/client-web/databases#createDocument

IamtheFuture
22 Sep, 2024, 00:08

Thanks so much, this is what I need

IamtheFuture
22 Sep, 2024, 01:05

Is there any solution for the collection attribute auto type generation

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more