8000 Add RLS reference to document level security documentation by ebenezerdon · Pull Request #1969 · appwrite/website · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ebenezerdon
Copy link
Contributor

What does this PR do?

  • Adds an info box to the database permissions documentation explaining how Appwrite's document-level security is similar to Row Level Security (RLS) in other database systems.

Test Plan

  • /docs/products/databases/permissions

@@ -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.
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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?

@coolify-appwrite-org
Copy link
coolify-appwrite-org bot commented Jun 24, 2025

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2025-06-24 11:13:42 CET

@stnguyen90 stnguyen90 self-requested a review June 24, 2025 13:22
Copy link
Contributor
@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0