Skip to content

Commit

Permalink
fix: expose role in admin user type (#790)
Browse files Browse the repository at this point in the history
## What kind of change does this PR introduce?
* Exposes the `role` field in the admin user type
  • Loading branch information
kangmingtay committed Oct 3, 2023
1 parent 4b6ec58 commit d2ec8ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,15 @@ export interface AdminUserAttributes extends Omit<UserAttributes, 'data'> {
* 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 {
Expand Down

0 comments on commit d2ec8ff

Please sign in to comment.