mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 09:28:28 +00:00
Fix blocking issue for auth admin bypass on selectOrganization
This commit is contained in:
@@ -457,7 +457,8 @@ export const authLoginServiceFactory = ({
|
|||||||
if (
|
if (
|
||||||
selectedOrg.authEnforced &&
|
selectedOrg.authEnforced &&
|
||||||
!isAuthMethodSaml(decodedToken.authMethod) &&
|
!isAuthMethodSaml(decodedToken.authMethod) &&
|
||||||
decodedToken.authMethod !== AuthMethod.OIDC
|
decodedToken.authMethod !== AuthMethod.OIDC &&
|
||||||
|
!(selectedOrg.bypassOrgAuthEnabled && selectedOrgMembership.userRole === OrgMembershipRole.Admin)
|
||||||
) {
|
) {
|
||||||
throw new BadRequestError({
|
throw new BadRequestError({
|
||||||
message: "Login with the auth method required by your organization."
|
message: "Login with the auth method required by your organization."
|
||||||
|
|||||||
Reference in New Issue
Block a user