I tried to store a row with this permissions:
permissions.push(
Permission.read(Role.users("verified")),
Permission.write(Role.label(c-${calendarSlug}.admin)),
Permission.update(Role.label(c-${calendarSlug}.editor)),
Permission.write(Role.user(user.$id)),
but i get this error:
'{"message":"Permissions must be one of: (roles and labels of my project) ","code":401,"type":"user_unauthorized","version":"1.8.0"}'
so i mean i cant set row level permissions before i created them, i think i trying to set dinamyc permissions but idk if that works
there is another way that can work something like this?
hello, i have the same exact problem, it seems that TablesDB does not consent to create a Permission for a role that has not yet been assigned to at least one user. this is a big limitation guys and it seems there isn't any workaround
A user cannot assign a permission they do not have. If you need to do that, use an API key.
See docs.
Hey @Steven thanks for the reponse, however this is not the same problem i think, i have an user that is "owner" of the team so i expect that he could do "whatever" he wants with the team, like create a new row and assign other team members with different role different permissions. the docs you linked say "A project user can only grant permissions to a resource that they have" and "If your app needs users to grant access to teams they're not a member of" but my user is owner of the Team, simpl,t "editor" and "user" roles hasn't any team member assigned yet. i hope i explain well and thanks again
Recommended threads
- Cloud function deploy stucks in processi...
Been trying for the last hours to deploy my function but for whatever reason, alwasy stuck on processing!
- One-time Cloud migration blocked by data...
Hi, I’m blocked on a one-time migration from Appwrite Cloud to my self-hosted Appwrite instance. We already fixed the region issue, and the migration now corre...
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...