From 59fc34412dde33add0068a73d2e93af344e3bdbe Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Thu, 27 Jun 2024 20:35:15 -0400 Subject: [PATCH] small nits for admin login toggle pr --- .../src/ee/services/ldap-config/ldap-config-service.ts | 2 +- backend/src/ee/services/oidc/oidc-config-service.ts | 2 +- .../src/ee/services/saml-config/saml-config-service.ts | 2 +- backend/src/services/auth/auth-login-service.ts | 8 ++++---- frontend/src/views/admin/DashboardPage/AuthPanel.tsx | 2 +- frontend/src/views/admin/DashboardPage/DashboardPage.tsx | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/src/ee/services/ldap-config/ldap-config-service.ts b/backend/src/ee/services/ldap-config/ldap-config-service.ts index 7434862fc7..55129ca025 100644 --- a/backend/src/ee/services/ldap-config/ldap-config-service.ts +++ b/backend/src/ee/services/ldap-config/ldap-config-service.ts @@ -415,7 +415,7 @@ export const ldapConfigServiceFactory = ({ if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.LDAP)) { throw new BadRequestError({ - message: "Login with LDAP is disabled." + message: "Login with LDAP is disabled by administrator." }); } diff --git a/backend/src/ee/services/oidc/oidc-config-service.ts b/backend/src/ee/services/oidc/oidc-config-service.ts index 58b098522c..55c929b9a9 100644 --- a/backend/src/ee/services/oidc/oidc-config-service.ts +++ b/backend/src/ee/services/oidc/oidc-config-service.ts @@ -161,7 +161,7 @@ export const oidcConfigServiceFactory = ({ if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.OIDC)) { throw new BadRequestError({ - message: "Login with OIDC is disabled." + message: "Login with OIDC is disabled by administrator." }); } diff --git a/backend/src/ee/services/saml-config/saml-config-service.ts b/backend/src/ee/services/saml-config/saml-config-service.ts index 286a85746d..9ac6c9c5ed 100644 --- a/backend/src/ee/services/saml-config/saml-config-service.ts +++ b/backend/src/ee/services/saml-config/saml-config-service.ts @@ -339,7 +339,7 @@ export const samlConfigServiceFactory = ({ if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.SAML)) { throw new BadRequestError({ - message: "Login with SAML is disabled." + message: "Login with SAML is disabled by administrator." }); } diff --git a/backend/src/services/auth/auth-login-service.ts b/backend/src/services/auth/auth-login-service.ts index 24ae087b7a..2ce900b471 100644 --- a/backend/src/services/auth/auth-login-service.ts +++ b/backend/src/services/auth/auth-login-service.ts @@ -167,7 +167,7 @@ export const authLoginServiceFactory = ({ !providerAuthToken ) { throw new BadRequestError({ - message: "Login with email is disabled." + message: "Login with email is disabled by administrator." }); } @@ -526,7 +526,7 @@ export const authLoginServiceFactory = ({ case AuthMethod.GITHUB: { if (!serverCfg.enabledLoginMethods.includes(LoginMethod.GITHUB)) { throw new BadRequestError({ - message: "Login with Github is disabled.", + message: "Login with Github is disabled by administrator.", name: "Oauth 2 login" }); } @@ -535,7 +535,7 @@ export const authLoginServiceFactory = ({ case AuthMethod.GOOGLE: { if (!serverCfg.enabledLoginMethods.includes(LoginMethod.GOOGLE)) { throw new BadRequestError({ - message: "Login with Google is disabled.", + message: "Login with Google is disabled by administrator.", name: "Oauth 2 login" }); } @@ -544,7 +544,7 @@ export const authLoginServiceFactory = ({ case AuthMethod.GITLAB: { if (!serverCfg.enabledLoginMethods.includes(LoginMethod.GITLAB)) { throw new BadRequestError({ - message: "Login with Gitlab is disabled.", + message: "Login with Gitlab is disabled by administrator.", name: "Oauth 2 login" }); } diff --git a/frontend/src/views/admin/DashboardPage/AuthPanel.tsx b/frontend/src/views/admin/DashboardPage/AuthPanel.tsx index f2fab83ec1..84e48ea0f6 100644 --- a/frontend/src/views/admin/DashboardPage/AuthPanel.tsx +++ b/frontend/src/views/admin/DashboardPage/AuthPanel.tsx @@ -117,7 +117,7 @@ export const AuthPanel = () => {
Login Methods
- Select the login methods available to users + Select the login methods you wish to allow for all users of this instance.
{

Admin Dashboard

-

Manage your Infisical instance.

+

Manage your instance level configurations.

{isUserLoading || isNotAllowed ? ( @@ -133,7 +133,7 @@ export const AdminDashboardPage = () => {
General - Auth + Authentication Rate Limit