Back

[SOLVED] Are permissions overwritten?

  • 0
  • Self Hosted
  • Databases
Ponguta_
24 Mar, 2023, 17:48

Little question:

do I need to add read permissions to superadmin? Or it will grant access with first line?

TL;DR
There is a question regarding permissions being overwritten. The user wants to know if granting read access to everyone on the team and then granting write access to the superadmin will overwrite the read permissions for the superadmin. The solution provided is that using `Role.team(TEAM_ID)` grants access to the entire team, while `Role.team(TEAM_ID, "superadmin")` grants access only to those with the "superadmin" role. It is not necessary to add read permissions to the superadmin, as the first line granting read access to everyone on the team will already include the superadmin.
Drake
24 Mar, 2023, 18:44

Role.team(TEAM_ID) is the entire team. Role.team(TEAM_ID, "superadmin") would be only those in the team that have the superadmin role.

Ponguta_
24 Mar, 2023, 19:23

Yep, but my question is just like. If I grant read access to everyone on the team.

And then, I grant write access to superadmin.

Will superadmin still has reading permissions, or they are going to be overwritted?

Drake
24 Mar, 2023, 19:38

Nope. You have both listed there

Ponguta_
24 Mar, 2023, 19:53

Ok Steven, thank you so much

Ponguta_
26 Mar, 2023, 21:05

[SOLVED] Are permissions overwritten?

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