Skip to content

Commit 395528d

Browse files
committed
Add owner role and update organization role defaults
Introduces an 'owner' role with full organization permissions and sets it as the default creatorRole. Updates documentation to include the new owner role alongside existing roles.
1 parent b5bdfaa commit 395528d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/api/src/auth/auth.client.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,20 @@ export const getAuth = async () => {
6161
enabled: true
6262
},
6363
// Define default organization roles with permissions
64-
creatorRole: 'admin',
64+
creatorRole: 'owner',
6565
roles: {
66-
admin: role({
66+
owner: role({
6767
organization: ['update', 'delete', 'read'],
6868
member: ['create', 'update', 'delete', 'read'],
6969
invitation: ['create', 'cancel', 'read'],
7070
team: ['create', 'update', 'delete', 'read']
7171
}),
72+
admin: role({
73+
organization: ['update', 'read'],
74+
member: ['create', 'update', 'delete', 'read'],
75+
invitation: ['create', 'cancel', 'read'],
76+
team: ['create', 'update', 'delete', 'read']
77+
}),
7278
user: role({
7379
organization: ['read'],
7480
member: ['read'],

packages/platform/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import * as path from 'path';
1818
*
1919
* Also includes standard Platform Roles:
2020
* - super_admin: System Administrator
21+
* - owner: Organization Owner
2122
* - admin: Organization Administrator
2223
* - user: Standard Member
2324
*

0 commit comments

Comments
 (0)