If I have a relation with multiple users, how can I ensure that only those users have the necessary permissions? Additionally, how can I update permissions automatically when a user is removed from the relation?
To paint a picture, something similar could be achieved within pocketbase permissions by adding a rule that looks something like "some_table.related_users.id ?= @request.auth.id". I don't expect it to be quite as easy, just looking for an efficient clean solution.
By maintaining a user permissions relation table and implementing permission checks based on this table, you can ensure that only specified users have the necessary permissions. Automating updates to this table using database triggers or application-level hooks ensures that permissions are kept up to date when users are removed
I believe the 'users permission relation table' isn't applicable for me however by 'database triggers' I assume you mean events and functions? That wouldn't be too bad. I'll see if I can find any code examples for events and functions.
Recommended threads
- Free plan Usage
I using a free plan with one organization. I have three projects but on the free plan I should be able to have 2 projects running But in my case only 1 out of ...
- Database AI Column Suggestion Use Case
I tried using the AI column suggestion feature. For me, I prefer writing my column design separately in a notepad. Then my intention is to paste it into the AI ...
- Issue with downloading large files (40GB...
Hi everyone! I am using the latest Appwrite 1.8.0 version on my self-hosted server. I successfully uploaded a large ZIP archive (~40GB) using the chunked uploa...