feat: govern connector configurations and simulations
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
import { createElement, lazy } from "react";
|
||||
import type {
|
||||
AdminSectionsUiCapability,
|
||||
PlatformWebModule
|
||||
} from "@govoplan/core-webui";
|
||||
import "./styles/connectors.css";
|
||||
|
||||
const ConnectorGovernancePage = lazy(
|
||||
() => import("./features/ConnectorGovernancePage")
|
||||
);
|
||||
|
||||
const readScopes = [
|
||||
"connectors:source:read",
|
||||
"connectors:source:admin"
|
||||
];
|
||||
|
||||
const adminSections: AdminSectionsUiCapability = {
|
||||
sections: [
|
||||
{
|
||||
id: "connector-governance",
|
||||
moduleId: "connectors",
|
||||
kind: "management",
|
||||
surfaceId: "connectors.admin.governed-configurations",
|
||||
label: "Connector governance",
|
||||
group: "SYSTEM",
|
||||
order: 45,
|
||||
anyOf: readScopes,
|
||||
render: ({ settings, auth }) =>
|
||||
createElement(ConnectorGovernancePage, { settings, auth })
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export const connectorsModule: PlatformWebModule = {
|
||||
id: "connectors",
|
||||
label: "Connectors",
|
||||
version: "0.1.18",
|
||||
dependencies: [],
|
||||
optionalDependencies: ["access", "audit", "policy", "ops"],
|
||||
viewSurfaces: [
|
||||
{
|
||||
id: "connectors.admin.governed-configurations",
|
||||
moduleId: "connectors",
|
||||
kind: "section",
|
||||
label: "Connector governance",
|
||||
order: 45
|
||||
},
|
||||
{
|
||||
id: "connectors.admin.simulation-review",
|
||||
moduleId: "connectors",
|
||||
kind: "section",
|
||||
label: "Connector simulation review",
|
||||
parentId: "connectors.admin.governed-configurations",
|
||||
order: 20
|
||||
}
|
||||
],
|
||||
uiCapabilities: {
|
||||
"admin.sections": adminSections
|
||||
}
|
||||
};
|
||||
|
||||
export default connectorsModule;
|
||||
Reference in New Issue
Block a user