mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 14:27:59 +00:00
lint fixes
This commit is contained in:
@@ -219,7 +219,7 @@ export const parseRotationErrorMessage = (err: unknown): string => {
|
|||||||
if (err instanceof AxiosError) {
|
if (err instanceof AxiosError) {
|
||||||
errorMessage += err?.response?.data
|
errorMessage += err?.response?.data
|
||||||
? JSON.stringify(err?.response?.data)
|
? JSON.stringify(err?.response?.data)
|
||||||
: (err?.message ?? "An unknown error occurred.");
|
: err?.message ?? "An unknown error occurred.";
|
||||||
} else {
|
} else {
|
||||||
errorMessage += (err as Error)?.message || "An unknown error occurred.";
|
errorMessage += (err as Error)?.message || "An unknown error occurred.";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ export const sshCertificateAuthorityServiceFactory = ({
|
|||||||
|
|
||||||
// set [keyId] depending on if [allowCustomKeyIds] is true or false
|
// set [keyId] depending on if [allowCustomKeyIds] is true or false
|
||||||
const keyId = sshCertificateTemplate.allowCustomKeyIds
|
const keyId = sshCertificateTemplate.allowCustomKeyIds
|
||||||
? (requestedKeyId ?? `${actor}-${actorId}`)
|
? requestedKeyId ?? `${actor}-${actorId}`
|
||||||
: `${actor}-${actorId}`;
|
: `${actor}-${actorId}`;
|
||||||
|
|
||||||
const sshCaSecret = await sshCertificateAuthoritySecretDAL.findOne({ sshCaId: sshCertificateTemplate.sshCaId });
|
const sshCaSecret = await sshCertificateAuthoritySecretDAL.findOne({ sshCaId: sshCertificateTemplate.sshCaId });
|
||||||
@@ -404,7 +404,7 @@ export const sshCertificateAuthorityServiceFactory = ({
|
|||||||
|
|
||||||
// set [keyId] depending on if [allowCustomKeyIds] is true or false
|
// set [keyId] depending on if [allowCustomKeyIds] is true or false
|
||||||
const keyId = sshCertificateTemplate.allowCustomKeyIds
|
const keyId = sshCertificateTemplate.allowCustomKeyIds
|
||||||
? (requestedKeyId ?? `${actor}-${actorId}`)
|
? requestedKeyId ?? `${actor}-${actorId}`
|
||||||
: `${actor}-${actorId}`;
|
: `${actor}-${actorId}`;
|
||||||
|
|
||||||
const sshCaSecret = await sshCertificateAuthoritySecretDAL.findOne({ sshCaId: sshCertificateTemplate.sshCaId });
|
const sshCaSecret = await sshCertificateAuthoritySecretDAL.findOne({ sshCaId: sshCertificateTemplate.sshCaId });
|
||||||
|
|||||||
@@ -401,8 +401,8 @@ export const authLoginServiceFactory = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const shouldCheckMfa = selectedOrg.enforceMfa || user.isMfaEnabled;
|
const shouldCheckMfa = selectedOrg.enforceMfa || user.isMfaEnabled;
|
||||||
const orgMfaMethod = selectedOrg.enforceMfa ? (selectedOrg.selectedMfaMethod ?? MfaMethod.EMAIL) : undefined;
|
const orgMfaMethod = selectedOrg.enforceMfa ? selectedOrg.selectedMfaMethod ?? MfaMethod.EMAIL : undefined;
|
||||||
const userMfaMethod = user.isMfaEnabled ? (user.selectedMfaMethod ?? MfaMethod.EMAIL) : undefined;
|
const userMfaMethod = user.isMfaEnabled ? user.selectedMfaMethod ?? MfaMethod.EMAIL : undefined;
|
||||||
const mfaMethod = orgMfaMethod ?? userMfaMethod;
|
const mfaMethod = orgMfaMethod ?? userMfaMethod;
|
||||||
|
|
||||||
if (shouldCheckMfa && (!decodedToken.isMfaVerified || decodedToken.mfaMethod !== mfaMethod)) {
|
if (shouldCheckMfa && (!decodedToken.isMfaVerified || decodedToken.mfaMethod !== mfaMethod)) {
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ export const parseSyncErrorMessage = (err: unknown): string => {
|
|||||||
} else if (err instanceof AxiosError) {
|
} else if (err instanceof AxiosError) {
|
||||||
errorMessage = err?.response?.data
|
errorMessage = err?.response?.data
|
||||||
? JSON.stringify(err?.response?.data)
|
? JSON.stringify(err?.response?.data)
|
||||||
: (err?.message ?? "An unknown error occurred.");
|
: err?.message ?? "An unknown error occurred.";
|
||||||
} else {
|
} else {
|
||||||
errorMessage = (err as Error)?.message || "An unknown error occurred.";
|
errorMessage = (err as Error)?.message || "An unknown error occurred.";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,8 +176,8 @@ export const superAdminServiceFactory = ({
|
|||||||
|
|
||||||
const canServerAdminAccessAfterApply =
|
const canServerAdminAccessAfterApply =
|
||||||
data.enabledLoginMethods.some((loginMethod) =>
|
data.enabledLoginMethods.some((loginMethod) =>
|
||||||
loginMethodToAuthMethod[loginMethod as LoginMethod].some((authMethod) =>
|
loginMethodToAuthMethod[loginMethod as LoginMethod].some(
|
||||||
superAdminUser.authMethods?.includes(authMethod)
|
(authMethod) => superAdminUser.authMethods?.includes(authMethod)
|
||||||
)
|
)
|
||||||
) ||
|
) ||
|
||||||
isUserSamlAccessEnabled ||
|
isUserSamlAccessEnabled ||
|
||||||
|
|||||||
Reference in New Issue
Block a user