Back

Labels

  • 0
  • Teams
  • Web
  • Accounts
  • Self Hosted
  • Users
Smiley
28 Dec, 2023, 08:02

Can I fetch what label the user has 'user' or 'admin' and give permission to visit the page..

TL;DR
Labels can only be set using the Console or Server SDK. They can be used as roles, and you can fetch the label assigned to a user using `account.get()`. You can then give permissions to visit a page based on the label.
Drake
28 Dec, 2023, 20:41

sure. it's in the response of account.get()

Smiley
29 Dec, 2023, 05:04

is it safe to use them as roles?

ideclon
29 Dec, 2023, 05:09

Labels can only be set from the Console or with a Server SDK. So yes.

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