Register BIM logout in platform session flow
This commit is contained in:
@@ -73,6 +73,7 @@ const bimViewerService = {
|
||||
"Standalone BIM/CAD viewer NODE.DC для рабочих моделей, вложений Operational Core, персонального модельного хранилища и безопасного внешнего просмотра по share-ссылкам.",
|
||||
url: "https://bim.nodedc.tech",
|
||||
launchUrl: "https://bim.nodedc.tech",
|
||||
logoutUrl: "https://bim.nodedc.tech/logout",
|
||||
accentColor: "#8FE3C8",
|
||||
fallbackGradient: "linear-gradient(132deg, rgba(143, 227, 200, 0.78), rgba(24, 70, 64, 0.9) 46%, #080B0F 84%)",
|
||||
status: "active",
|
||||
@@ -2351,6 +2352,7 @@ function applyBimViewerServiceInvariants(data) {
|
||||
service.fullDescription = service.fullDescription || bimViewerService.fullDescription;
|
||||
service.url = service.url || bimViewerService.url;
|
||||
service.launchUrl = service.launchUrl || service.url || bimViewerService.launchUrl;
|
||||
service.logoutUrl = service.logoutUrl || bimViewerService.logoutUrl;
|
||||
service.accentColor = service.accentColor || bimViewerService.accentColor;
|
||||
service.fallbackGradient = service.fallbackGradient || bimViewerService.fallbackGradient;
|
||||
service.status = service.status || bimViewerService.status;
|
||||
@@ -2488,6 +2490,20 @@ function upsertSystemProtectedUserGrant(data, user, service, appRole, now) {
|
||||
|
||||
function normalizeService(service) {
|
||||
if (typeof service !== "object" || service === null) return service;
|
||||
if (service.id === "service_bim_viewer" || service.slug === "bim-viewer" || service.authentikApplicationSlug === "bim-viewer") {
|
||||
const legacyLocalUrl = (value) => value === "http://localhost:8080" || value === "http://127.0.0.1:8080";
|
||||
return {
|
||||
...service,
|
||||
url: !service.url || legacyLocalUrl(service.url) ? "https://bim.nodedc.tech" : service.url,
|
||||
launchUrl:
|
||||
!service.launchUrl || legacyLocalUrl(service.launchUrl)
|
||||
? "https://bim.nodedc.tech"
|
||||
: service.launchUrl,
|
||||
logoutUrl: service.logoutUrl || "https://bim.nodedc.tech/logout",
|
||||
authentikApplicationSlug: service.authentikApplicationSlug || "bim-viewer",
|
||||
authentikGroupName: service.authentikGroupName || "nodedc:bim:access",
|
||||
};
|
||||
}
|
||||
if (service.id !== "service_nodedc" && service.slug !== "nodedc" && service.authentikApplicationSlug !== "nodedc") return service;
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user