mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
small nits for admin login toggle pr
This commit is contained in:
@@ -415,7 +415,7 @@ export const ldapConfigServiceFactory = ({
|
|||||||
|
|
||||||
if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.LDAP)) {
|
if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.LDAP)) {
|
||||||
throw new BadRequestError({
|
throw new BadRequestError({
|
||||||
message: "Login with LDAP is disabled."
|
message: "Login with LDAP is disabled by administrator."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ export const oidcConfigServiceFactory = ({
|
|||||||
|
|
||||||
if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.OIDC)) {
|
if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.OIDC)) {
|
||||||
throw new BadRequestError({
|
throw new BadRequestError({
|
||||||
message: "Login with OIDC is disabled."
|
message: "Login with OIDC is disabled by administrator."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ export const samlConfigServiceFactory = ({
|
|||||||
|
|
||||||
if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.SAML)) {
|
if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.SAML)) {
|
||||||
throw new BadRequestError({
|
throw new BadRequestError({
|
||||||
message: "Login with SAML is disabled."
|
message: "Login with SAML is disabled by administrator."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export const authLoginServiceFactory = ({
|
|||||||
!providerAuthToken
|
!providerAuthToken
|
||||||
) {
|
) {
|
||||||
throw new BadRequestError({
|
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: {
|
case AuthMethod.GITHUB: {
|
||||||
if (!serverCfg.enabledLoginMethods.includes(LoginMethod.GITHUB)) {
|
if (!serverCfg.enabledLoginMethods.includes(LoginMethod.GITHUB)) {
|
||||||
throw new BadRequestError({
|
throw new BadRequestError({
|
||||||
message: "Login with Github is disabled.",
|
message: "Login with Github is disabled by administrator.",
|
||||||
name: "Oauth 2 login"
|
name: "Oauth 2 login"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -535,7 +535,7 @@ export const authLoginServiceFactory = ({
|
|||||||
case AuthMethod.GOOGLE: {
|
case AuthMethod.GOOGLE: {
|
||||||
if (!serverCfg.enabledLoginMethods.includes(LoginMethod.GOOGLE)) {
|
if (!serverCfg.enabledLoginMethods.includes(LoginMethod.GOOGLE)) {
|
||||||
throw new BadRequestError({
|
throw new BadRequestError({
|
||||||
message: "Login with Google is disabled.",
|
message: "Login with Google is disabled by administrator.",
|
||||||
name: "Oauth 2 login"
|
name: "Oauth 2 login"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -544,7 +544,7 @@ export const authLoginServiceFactory = ({
|
|||||||
case AuthMethod.GITLAB: {
|
case AuthMethod.GITLAB: {
|
||||||
if (!serverCfg.enabledLoginMethods.includes(LoginMethod.GITLAB)) {
|
if (!serverCfg.enabledLoginMethods.includes(LoginMethod.GITLAB)) {
|
||||||
throw new BadRequestError({
|
throw new BadRequestError({
|
||||||
message: "Login with Gitlab is disabled.",
|
message: "Login with Gitlab is disabled by administrator.",
|
||||||
name: "Oauth 2 login"
|
name: "Oauth 2 login"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export const AuthPanel = () => {
|
|||||||
<div className="flex flex-col justify-start">
|
<div className="flex flex-col justify-start">
|
||||||
<div className="mb-2 text-xl font-semibold text-mineshaft-100">Login Methods</div>
|
<div className="mb-2 text-xl font-semibold text-mineshaft-100">Login Methods</div>
|
||||||
<div className="mb-4 max-w-sm text-sm text-mineshaft-400">
|
<div className="mb-4 max-w-sm text-sm text-mineshaft-400">
|
||||||
Select the login methods available to users
|
Select the login methods you wish to allow for all users of this instance.
|
||||||
</div>
|
</div>
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export const AdminDashboardPage = () => {
|
|||||||
<div className="mx-auto mb-6 w-full max-w-7xl pt-6">
|
<div className="mx-auto mb-6 w-full max-w-7xl pt-6">
|
||||||
<div className="mb-8 flex flex-col items-start justify-between text-xl">
|
<div className="mb-8 flex flex-col items-start justify-between text-xl">
|
||||||
<h1 className="text-3xl font-semibold">Admin Dashboard</h1>
|
<h1 className="text-3xl font-semibold">Admin Dashboard</h1>
|
||||||
<p className="text-base text-bunker-300">Manage your Infisical instance.</p>
|
<p className="text-base text-bunker-300">Manage your instance level configurations.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{isUserLoading || isNotAllowed ? (
|
{isUserLoading || isNotAllowed ? (
|
||||||
@@ -133,7 +133,7 @@ export const AdminDashboardPage = () => {
|
|||||||
<TabList>
|
<TabList>
|
||||||
<div className="flex w-full flex-row border-b border-mineshaft-600">
|
<div className="flex w-full flex-row border-b border-mineshaft-600">
|
||||||
<Tab value={TabSections.Settings}>General</Tab>
|
<Tab value={TabSections.Settings}>General</Tab>
|
||||||
<Tab value={TabSections.Auth}>Auth</Tab>
|
<Tab value={TabSections.Auth}>Authentication</Tab>
|
||||||
<Tab value={TabSections.RateLimit}>Rate Limit</Tab>
|
<Tab value={TabSections.RateLimit}>Rate Limit</Tab>
|
||||||
</div>
|
</div>
|
||||||
</TabList>
|
</TabList>
|
||||||
|
|||||||
Reference in New Issue
Block a user