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
No, same rules apply.
Recommended threads
- Appwrite project paused
I have github student account. The auth has been paused however the database is working fine. I cant see any option to resume from my console panel. It is just ...
- Missing Invoice
Hi! I need help with billing on my account (marelu@gmail.com). I have never received a single invoice by email. My organization has been on the Pro plan since...
- Appwrite Functions cold start
Hello. I'm seeing really long cold starts on Appwrite Cloud Functions and wanted to know if this is expected. My function just authenticates the user, fetches ...