-
Notifications
You must be signed in to change notification settings - Fork 255
Add RLS reference to document level security documentation #1969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -23,6 +23,10 @@ Configure collection level permissions by navigating to **Your collection** > ** | |||
Document level permissions grant access to individual documents. | |||
If a user has read, create, update, or delete permissions at the document level, the user can access the **individual document**. | |||
|
|||
{% info title="Does Appwrite support Row Level Security (RLS)?" %} | |||
Document level security in Appwrite is similar to what is known as Row Level Security (RLS) found in database systems like PostgreSQL. Both concepts allow you to control access to individual records based on user identity and roles. If you're familiar with RLS, you'll find Appwrite's document level security provides similar granular access control. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provides similar granular access control.
While both allows giving granular access, RLS is quite different than Appwrite's permission model so we should make sure that's clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stnguyen90 Can you help with the specific difference(s) so we can make it clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Postgres' RLS allows you to add a policy to a table. For example, given table:
CREATE TABLE accounts (manager text, company text, contact_email text);
this policy:
CREATE POLICY account_managers ON accounts TO managers
USING (manager = current_user);
Makes it so when a query is done on the accounts
table, only rows where the manager
column matches current_user
will return.
With Appwrite's document-level permissions, you set on the document which user should have access to that document.
Does that give you enough information to better word it?
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-06-24 11:13:42 CET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment.
What does this PR do?
Test Plan
/docs/products/databases/permissions