Skip to content

Commit

Permalink
fix(backend): Replace OrganizationMembershipRole with custom types …
Browse files Browse the repository at this point in the history
…for authorization (#2408)

* fix(backend): Replace `OrganizationMembershipRole` with custom types for authorization

* fix(backend): Add changeset
  • Loading branch information
panteliselef authored Dec 20, 2023
1 parent e1c3904 commit f4f99f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/beige-eyes-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/backend': patch
---

`OrganizationMembershipRole` should respect authorization types provided by the developer if those exist.
4 changes: 3 additions & 1 deletion packages/backend/src/api/resources/Enums.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { OrganizationCustomRoleKey } from '@clerk/types';

export type OAuthProvider =
| 'facebook'
| 'google'
Expand All @@ -20,7 +22,7 @@ export type OAuthStrategy = `oauth_${OAuthProvider}`;

export type OrganizationInvitationStatus = 'pending' | 'accepted' | 'revoked';

export type OrganizationMembershipRole = 'basic_member' | 'guest_member' | 'admin';
export type OrganizationMembershipRole = OrganizationCustomRoleKey;

export type SignInStatus = 'needs_identifier' | 'needs_factor_one' | 'needs_factor_two' | 'complete';

Expand Down

0 comments on commit f4f99f1

Please sign in to comment.