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 (#2405)

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

* fix(backend): Add changeset
  • Loading branch information
panteliselef authored Dec 20, 2023
1 parent 98f8ec6 commit a8feab7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-carrots-whisper.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 { MembershipRole } 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 = MembershipRole;

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

Expand Down

0 comments on commit a8feab7

Please sign in to comment.