mirror of
https://github.com/docmost/docmost
synced 2025-03-28 21:13:28 +00:00
* prefetch sso providers in settings
* hide sso enforcement in standard plan
This commit is contained in:
parent
fd36076ae7
commit
5c9e0a2630
@ -8,6 +8,7 @@ import { getGroups } from "@/features/group/services/group-service.ts";
|
||||
import { QueryParams } from "@/lib/types.ts";
|
||||
import { getWorkspaceMembers } from "@/features/workspace/services/workspace-service.ts";
|
||||
import { getLicenseInfo } from "@/ee/licence/services/license-service.ts";
|
||||
import { getSsoProviders } from '@/ee/security/services/security-service.ts';
|
||||
|
||||
export const prefetchWorkspaceMembers = () => {
|
||||
const params = { limit: 100, page: 1, query: "" } as QueryParams;
|
||||
@ -49,3 +50,10 @@ export const prefetchLicense = () => {
|
||||
queryFn: () => getLicenseInfo(),
|
||||
});
|
||||
};
|
||||
|
||||
export const prefetchSsoProviders = () => {
|
||||
queryClient.prefetchQuery({
|
||||
queryKey: ["sso-providers"],
|
||||
queryFn: () => getSsoProviders(),
|
||||
});
|
||||
};
|
@ -24,6 +24,7 @@ import {
|
||||
prefetchGroups,
|
||||
prefetchLicense,
|
||||
prefetchSpaces,
|
||||
prefetchSsoProviders,
|
||||
prefetchWorkspaceMembers,
|
||||
} from "@/components/settings/settings-queries.tsx";
|
||||
|
||||
@ -165,6 +166,9 @@ export default function SettingsSidebar() {
|
||||
prefetchHandler = prefetchLicense;
|
||||
}
|
||||
break;
|
||||
case "Security & SSO":
|
||||
prefetchHandler = prefetchSsoProviders;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -35,17 +35,15 @@ export default function Security() {
|
||||
Single sign-on (SSO)
|
||||
</Title>
|
||||
|
||||
<EnforceSso />
|
||||
|
||||
<Divider my="lg" />
|
||||
|
||||
{!isCloud() && hasLicenseKey ? <CreateSsoProvider /> : ""}
|
||||
|
||||
{/*TODO: revisit when we add a second plan
|
||||
<CreateSsoProvider />
|
||||
*/}
|
||||
|
||||
<Divider size={0} my="lg" />
|
||||
{/*TODO: revisit when we add a second plan */}
|
||||
{!isCloud() && hasLicenseKey ? (
|
||||
<>
|
||||
<EnforceSso />
|
||||
<Divider my="lg" />
|
||||
<CreateSsoProvider />
|
||||
<Divider size={0} my="lg" />
|
||||
</>
|
||||
) : null}
|
||||
|
||||
<SsoProviderList />
|
||||
</>
|
||||
|
Loading…
x
Reference in New Issue
Block a user