Back

Permission management for Client and its related Collection

  • 0
  • Self Hosted
  • Functions
  • Databases
  • Web
Suiii
5 Jan, 2024, 08:34

how I do prepare the collection and to perform this. please note that I do not use the relationship as it is not stable and maybe complex.

let say I have a client collection ( where specific clients are assigned to specific usersss to read only, to read/edit, and admin to do all.

And, I have other collection, followUp, which related to client collection. and users having the same permission as if they have for the client collection.

For example the collecton like this

ClientId, ClientName, ClientDOB, Others

Id, ClientId, Date, Notes (how to make Id, ClientId are PK) which cant be duplicated.

So in the page will be , where to show all the users having permission to the specific client. let say I access ClientId 1, then I see who has permission to that client and so on.

what is the proper way to handle this ? please kindly share me . Thanks. make it better and clear

TL;DR
The user is asking for guidance on how to manage permissions for a client collection and its related collection. They do not want to use relationships as they find them unstable and complex. They want to assign specific users to have read-only, read/edit, or admin access to clients. The same permissions should apply to the related follow-up collection. They also want to know how to show the users with access to a specific client on a page. A possible solution could be to create a team per client with different roles for different types of access.
Suiii
5 Jan, 2024, 14:02

👋👋

Drake
6 Jan, 2024, 21:29

Maybe a team per client with different roles for the different access?

Suiii
10 Jan, 2024, 08:29

can I query documents like where $permission includes userId [a,b,c] . something like this.

ideclon
10 Jan, 2024, 08:31

No

Suiii
10 Jan, 2024, 08:33

any solution ?

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