Add identity trust administration surfaces
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import { createElement, lazy } from "react";
|
||||
import type {
|
||||
AdminSectionsUiCapability,
|
||||
PlatformWebModule,
|
||||
SettingsSectionsUiCapability
|
||||
} from "@govoplan/core-webui";
|
||||
import { generatedTranslations } from "./i18n/generatedTranslations";
|
||||
import "./styles/identity-trust.css";
|
||||
|
||||
const IdentityTrustPanel = lazy(() => import("./features/IdentityTrustPanel"));
|
||||
|
||||
const settingsSections: SettingsSectionsUiCapability = {
|
||||
sections: [
|
||||
{
|
||||
id: "identity-trust",
|
||||
surfaceId: "identity_trust.settings.devices",
|
||||
label: "i18n:govoplan-identity-trust.device_trust",
|
||||
group: "account",
|
||||
order: 45,
|
||||
anyOf: ["identity_trust:device:read", "identity_trust:assurance:read"],
|
||||
render: ({ settings, auth }) => createElement(IdentityTrustPanel, { settings, auth })
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const adminSections: AdminSectionsUiCapability = {
|
||||
sections: [
|
||||
{
|
||||
id: "tenant-identity-trust",
|
||||
moduleId: "identity_trust",
|
||||
kind: "management",
|
||||
surfaceId: "identity_trust.admin.trust",
|
||||
label: "i18n:govoplan-identity-trust.identity_trust",
|
||||
group: "TENANT",
|
||||
order: 75,
|
||||
anyOf: ["identity_trust:device:admin"],
|
||||
render: ({ settings, auth }) => createElement(IdentityTrustPanel, { settings, auth, administrative: true })
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export const identityTrustModule: PlatformWebModule = {
|
||||
id: "identity_trust",
|
||||
label: "i18n:govoplan-identity-trust.identity_trust",
|
||||
version: "0.1.14",
|
||||
dependencies: [],
|
||||
optionalDependencies: ["access", "audit", "policy", "encryption", "postbox"],
|
||||
translations: generatedTranslations,
|
||||
viewSurfaces: [
|
||||
{ id: "identity_trust.settings.devices", moduleId: "identity_trust", kind: "section", label: "i18n:govoplan-identity-trust.device_trust", order: 10 },
|
||||
{ id: "identity_trust.admin.trust", moduleId: "identity_trust", kind: "section", label: "i18n:govoplan-identity-trust.identity_trust_administration", order: 20 },
|
||||
{ id: "identity_trust.admin.epochs", moduleId: "identity_trust", kind: "section", label: "i18n:govoplan-identity-trust.key_epochs", parentId: "identity_trust.admin.trust", order: 30 },
|
||||
{ id: "identity_trust.admin.decisions", moduleId: "identity_trust", kind: "section", label: "i18n:govoplan-identity-trust.key_access_decisions", parentId: "identity_trust.admin.trust", order: 40 }
|
||||
],
|
||||
uiCapabilities: {
|
||||
"settings.sections": settingsSections,
|
||||
"admin.sections": adminSections
|
||||
}
|
||||
};
|
||||
|
||||
export default identityTrustModule;
|
||||
Reference in New Issue
Block a user