From 3546b96349d9c43fa0fdaf40a5f12e5c8a867796 Mon Sep 17 00:00:00 2001 From: Kang Ming Date: Mon, 2 Oct 2023 10:19:55 -0700 Subject: [PATCH] fix: expose role in admin user type --- src/lib/types.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/types.ts b/src/lib/types.ts index e03aa7a91..f5d5ffd19 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -378,6 +378,15 @@ export interface AdminUserAttributes extends Omit { * Setting the ban duration to 'none' lifts the ban on the user. */ ban_duration?: string | 'none' + + /** + * The `role` claim set in the user's access token JWT. + * + * When a user signs up, this role is set to `authenticated` by default. You should only modify the `role` if you need to provision several levels of admin access that have different permissions on individual columns in your database. + * + * Setting this role to `service_role` is not recommended as it grants the user admin privileges. + */ + role?: string } export interface Subscription {