Skip to content
Back

Dynamic Roles

  • 0
  • Web
  • Cloud
astro
4 Nov, 2025, 01:09

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

TL;DR
Developers are trying to set dynamic permissions based on roles, but are encountering an error stating that permissions must be one of the roles and labels within the project. It seems like they can't set row level permissions before creating them. They are unsure if setting dynamic permissions will work.
astro
4 Nov, 2025, 01:10

there is another way that can work something like this?

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