mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-10-21 07:55:25 +00:00
fix(sso): mark self-hosted owner as verified when SSO is configured
This commit is contained in:
@@ -5,6 +5,7 @@ import { member, ssoProvider, user } from "@dokploy/server/db/schema";
|
||||
import { ssoProviderBodySchema } from "@dokploy/server/db/schema/sso";
|
||||
import {
|
||||
getOrganizationOwnerId,
|
||||
markOrganizationOwnerVerified,
|
||||
requestToHeaders,
|
||||
} from "@dokploy/server/index";
|
||||
import { auth } from "@dokploy/server/lib/auth";
|
||||
@@ -212,6 +213,7 @@ export const ssoRouter = createTRPCRouter({
|
||||
body: updateBody,
|
||||
headers: requestToHeaders(ctx.req),
|
||||
});
|
||||
await markOrganizationOwnerVerified(ctx.session.activeOrganizationId);
|
||||
return { success: true };
|
||||
}),
|
||||
deleteProvider: enterpriseProcedure
|
||||
@@ -292,6 +294,7 @@ export const ssoRouter = createTRPCRouter({
|
||||
},
|
||||
headers: requestToHeaders(ctx.req),
|
||||
});
|
||||
await markOrganizationOwnerVerified(organizationId);
|
||||
return { success: true };
|
||||
}),
|
||||
addTrustedOrigin: enterpriseProcedure
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
getUpdateData,
|
||||
getWebServerSettings,
|
||||
IS_CLOUD,
|
||||
markOrganizationOwnerVerified,
|
||||
parseRawConfig,
|
||||
paths,
|
||||
prepareEnvironmentVariables,
|
||||
@@ -467,6 +468,9 @@ export const settingsRouter = createTRPCRouter({
|
||||
await updateWebServerSettings({
|
||||
enforceSSO: input.enforceSSO,
|
||||
});
|
||||
if (input.enforceSSO) {
|
||||
await markOrganizationOwnerVerified(ctx.session.activeOrganizationId);
|
||||
}
|
||||
|
||||
await audit(ctx, {
|
||||
action: "update",
|
||||
|
||||
Reference in New Issue
Block a user