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
- API key without database.read/write
I had some issues with my previous API key and I deleted it then I wanted to create a new one and discovered the database checkbook has no database.read/write j...
- dynamic key missing scopes for database ...
Here are the scopes listed, I get permission errors for reading row and document. Appears to be missing since last time i checked. Database 6 Scopes policies....
- No server error on selfhosted appwrite
Please help me, my clients is ask what happen on their data? How can i make it up again?