mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 13:56:43 +00:00
misc: made bypass opt-in
This commit is contained in:
@@ -69,7 +69,10 @@ export const SelectOrganizationPage = () => {
|
||||
|
||||
const handleSelectOrganization = useCallback(
|
||||
async (organization: Organization) => {
|
||||
if (organization.authEnforced && organization.userRole !== OrgMembershipRole.Admin) {
|
||||
const canBypassOrgAuth =
|
||||
organization.enableBypassOrgAuth && organization.userRole === OrgMembershipRole.Admin;
|
||||
|
||||
if (organization.authEnforced && !canBypassOrgAuth) {
|
||||
// org has an org-level auth method enabled (e.g. SAML)
|
||||
// -> logout + redirect to SAML SSO
|
||||
await logout.mutateAsync();
|
||||
|
||||
Reference in New Issue
Block a user