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
- Migration Pending version 1.9.0 self Hos...
I am trying to use the migration feature, my migration has been sitting in a "pending" state for 5 hours now? this is all that is in the "logs" { "$id": "69c...
- Redis exception after failed upgrade
After attempting an Update from 1.8.1 to 1.9.0 where i accidentally typed 1.8.0 I've encountered multiple issues with my appwrite instance all of which resultin...
- I lost my account, only thing i have is ...
So i had this project on appwrite for my web project called Islami zindagi, but i havent used it in a while, now i tried to login, but i could not remember the ...