mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 09:28:06 +00:00
Lint fix
This commit is contained in:
@@ -453,6 +453,12 @@ export const authLoginServiceFactory = ({
|
|||||||
|
|
||||||
const selectedOrg = await orgDAL.findById(organizationId);
|
const selectedOrg = await orgDAL.findById(organizationId);
|
||||||
|
|
||||||
|
if (!selectedOrgMembership) {
|
||||||
|
throw new ForbiddenRequestError({
|
||||||
|
message: `User does not have access to the organization named ${selectedOrg?.name}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Check if authEnforced is true and the current auth method is not an enforced method
|
// Check if authEnforced is true and the current auth method is not an enforced method
|
||||||
if (
|
if (
|
||||||
selectedOrg.authEnforced &&
|
selectedOrg.authEnforced &&
|
||||||
@@ -465,12 +471,6 @@ export const authLoginServiceFactory = ({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!selectedOrgMembership) {
|
|
||||||
throw new ForbiddenRequestError({
|
|
||||||
message: `User does not have access to the organization named ${selectedOrg?.name}`
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectedOrg.googleSsoAuthEnforced && decodedToken.authMethod !== AuthMethod.GOOGLE) {
|
if (selectedOrg.googleSsoAuthEnforced && decodedToken.authMethod !== AuthMethod.GOOGLE) {
|
||||||
const canBypass = selectedOrg.bypassOrgAuthEnabled && selectedOrgMembership.userRole === OrgMembershipRole.Admin;
|
const canBypass = selectedOrg.bypassOrgAuthEnabled && selectedOrgMembership.userRole === OrgMembershipRole.Admin;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user