You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0a2970f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(organizations): refuse self-leave for directory-managed members and keep the renamed name visible (#9609)
* fix(organizations): refuse self-leave for directory-managed members and keep the renamed name visible
* fix(organizations): refuse transfer-and-leave for directory-managed owners
* fix(organizations): transfer ownership for directory-managed owners and explain why they stay
Copy file name to clipboardExpand all lines: apps/sim/app/o/[organizationId]/components/organization-sidebar/components/organization-header/organization-header.tsx
+18-8Lines changed: 18 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,14 @@ export function OrganizationHeader({
* Deliberately not applied to deprovisioning: an administrator must always be
17
-
* able to remove someone in an emergency, whatever the directory believes.
17
+
* able to remove someone in an emergency, whatever the directory believes. A
18
+
* member removing themselves is refused, since the directory would re-add them.
18
19
*/
19
20
20
21
/**
@@ -63,6 +64,32 @@ export async function assertMembershipNotScimManaged(params: {
63
64
userId: string
64
65
executor: DbOrTx
65
66
}): Promise<void>{
67
+
awaitrefuseIfDirectoryManaged(
68
+
params,
69
+
'This member is managed by the organization’s identity provider. Make the change there, or turn off managed-membership locking in the organization’s directory settings.'
70
+
)
71
+
}
72
+
73
+
/**
74
+
* Refuses a directory-managed member leaving on their own. Unlike an
75
+
* administrator's removal, which must always succeed, a self-leave only lasts
76
+
* until the next sync re-adds the member, so it is refused with the remedy.
'This member is managed by the organization’s identity provider. Make the change there, or turn off managed-membership locking in the organization’s directory settings.'
0 commit comments