@@ -19,6 +19,7 @@ export const membershipLayoutQuery = graphql`
|
||||
}
|
||||
}
|
||||
viewer @required(action: THROW) {
|
||||
...SidebarFragment @arguments(organizationId: $organizationId)
|
||||
...MembershipsDropdown_viewerFragment
|
||||
pendingInvitations @required(action: THROW) {
|
||||
totalCount @required(action: THROW)
|
||||
@@ -67,7 +68,7 @@ export function MembershipLayout(props: {
|
||||
</Suspense>
|
||||
</>
|
||||
}
|
||||
sidebar={<Sidebar />}
|
||||
sidebar={<Sidebar fKey={viewer} />}
|
||||
>
|
||||
<CoreRelayProvider>
|
||||
<Outlet />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<5ad02f9e0c07f5e9900005150f93d6fe>>
|
||||
* @generated SignedSource<<90e5e1f754a2b18caa9b6f4f208ec5a8>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ export type MembershipLayoutQuery$data = {
|
||||
readonly pendingInvitations: {
|
||||
readonly totalCount: number;
|
||||
};
|
||||
readonly " $fragmentSpreads": FragmentRefs<"MembershipsDropdown_viewerFragment">;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"MembershipsDropdown_viewerFragment" | "SidebarFragment">;
|
||||
};
|
||||
};
|
||||
export type MembershipLayoutQuery = {
|
||||
@@ -37,21 +37,22 @@ var v0 = [
|
||||
"name": "organizationId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
}
|
||||
v1 = {
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
},
|
||||
v2 = [
|
||||
(v1/*: any*/)
|
||||
],
|
||||
v2 = {
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
@@ -69,7 +70,7 @@ return {
|
||||
"kind": "RequiredField",
|
||||
"field": {
|
||||
"alias": "organization",
|
||||
"args": (v1/*: any*/),
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
@@ -107,6 +108,17 @@ return {
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "organizationId",
|
||||
"variableName": "organizationId"
|
||||
}
|
||||
],
|
||||
"kind": "FragmentSpread",
|
||||
"name": "SidebarFragment"
|
||||
},
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
@@ -124,7 +136,7 @@ return {
|
||||
"selections": [
|
||||
{
|
||||
"kind": "RequiredField",
|
||||
"field": (v2/*: any*/),
|
||||
"field": (v3/*: any*/),
|
||||
"action": "THROW"
|
||||
}
|
||||
],
|
||||
@@ -149,7 +161,7 @@ return {
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v1/*: any*/),
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
@@ -195,7 +207,7 @@ return {
|
||||
"name": "email",
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/)
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -214,11 +226,11 @@ return {
|
||||
"name": "fullName",
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/)
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/)
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -226,7 +238,7 @@ return {
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
},
|
||||
(v3/*: any*/)
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -238,6 +250,272 @@ return {
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": "canListMeetings",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:meeting:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListTasks",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:task:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListMeasures",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:measures:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListRisks",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:risk:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListFrameworks",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:frameworks:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListPeople",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:people:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListVendors",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:vendor:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListDocuments",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:document:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListAssets",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:asset:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListData",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:datum:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListAudits",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:audit:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListNonconformities",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:nonconformity:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListObligations",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:obligation:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListContinualImprovements",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:continual-improvement:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListProcessingActivities",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:processing-activity:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListStatesOfApplicability",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListSnapshots",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:snapshot:list"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canGetTrustCenter",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:trust-center:get"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canUpdateOrganization",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "iam:organization:update"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -246,27 +524,27 @@ return {
|
||||
"name": "pendingInvitations",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/)
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/)
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "1fcebe9376b82798d829d98e2bdabaf3",
|
||||
"cacheID": "1fb1002661548737fdb22694a23bca35",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MembershipLayoutQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MembershipLayoutQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n ...MembershipsDropdown_organizationFragment\n ...SessionDropdownFragment\n }\n id\n }\n viewer {\n ...MembershipsDropdown_viewerFragment\n pendingInvitations {\n totalCount\n }\n id\n }\n}\n\nfragment MembershipsDropdown_organizationFragment on Organization {\n name\n}\n\nfragment MembershipsDropdown_viewerFragment on Identity {\n pendingInvitations {\n totalCount\n }\n}\n\nfragment SessionDropdownFragment on Organization {\n viewerMembership {\n identity {\n email\n id\n }\n profile {\n fullName\n id\n }\n id\n }\n}\n"
|
||||
"text": "query MembershipLayoutQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n ...MembershipsDropdown_organizationFragment\n ...SessionDropdownFragment\n }\n id\n }\n viewer {\n ...SidebarFragment_4xMPKw\n ...MembershipsDropdown_viewerFragment\n pendingInvitations {\n totalCount\n }\n id\n }\n}\n\nfragment MembershipsDropdown_organizationFragment on Organization {\n name\n}\n\nfragment MembershipsDropdown_viewerFragment on Identity {\n pendingInvitations {\n totalCount\n }\n}\n\nfragment SessionDropdownFragment on Organization {\n viewerMembership {\n identity {\n email\n id\n }\n profile {\n fullName\n id\n }\n id\n }\n}\n\nfragment SidebarFragment_4xMPKw on Identity {\n canListMeetings: permission(action: \"core:meeting:list\", id: $organizationId)\n canListTasks: permission(action: \"core:task:list\", id: $organizationId)\n canListMeasures: permission(action: \"core:measures:list\", id: $organizationId)\n canListRisks: permission(action: \"core:risk:list\", id: $organizationId)\n canListFrameworks: permission(action: \"core:frameworks:list\", id: $organizationId)\n canListPeople: permission(action: \"core:people:list\", id: $organizationId)\n canListVendors: permission(action: \"core:vendor:list\", id: $organizationId)\n canListDocuments: permission(action: \"core:document:list\", id: $organizationId)\n canListAssets: permission(action: \"core:asset:list\", id: $organizationId)\n canListData: permission(action: \"core:datum:list\", id: $organizationId)\n canListAudits: permission(action: \"core:audit:list\", id: $organizationId)\n canListNonconformities: permission(action: \"core:nonconformity:list\", id: $organizationId)\n canListObligations: permission(action: \"core:obligation:list\", id: $organizationId)\n canListContinualImprovements: permission(action: \"core:continual-improvement:list\", id: $organizationId)\n canListProcessingActivities: permission(action: \"core:processing-activity:list\", id: $organizationId)\n canListStatesOfApplicability: permission(action: \"core:state-of-applicability:list\", id: $organizationId)\n canListSnapshots: permission(action: \"core:snapshot:list\", id: $organizationId)\n canGetTrustCenter: permission(action: \"core:trust-center:get\", id: $organizationId)\n canUpdateOrganization: permission(action: \"iam:organization:update\", id: $organizationId)\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "c703bc4dce3307a22e42b5fa528537b2";
|
||||
(node as any).hash = "bea3f973a014e38e291ecd177da5c5f5";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { use } from "react";
|
||||
import { PermissionsContext } from "/providers/PermissionsContext";
|
||||
import {
|
||||
IconBank,
|
||||
IconBook,
|
||||
@@ -24,144 +22,210 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment } from "react-relay";
|
||||
import type { SidebarFragment$key } from "./__generated__/SidebarFragment.graphql";
|
||||
|
||||
const fragment = graphql`
|
||||
fragment SidebarFragment on Identity
|
||||
@argumentDefinitions(organizationId: { type: "ID!" }) {
|
||||
canListMeetings: permission(
|
||||
action: "core:meeting:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canListTasks: permission(action: "core:task:list", id: $organizationId)
|
||||
canListMeasures: permission(
|
||||
action: "core:measures:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canListRisks: permission(action: "core:risk:list", id: $organizationId)
|
||||
canListFrameworks: permission(
|
||||
action: "core:frameworks:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canListPeople: permission(action: "core:people:list", id: $organizationId)
|
||||
canListVendors: permission(action: "core:vendor:list", id: $organizationId)
|
||||
canListDocuments: permission(
|
||||
action: "core:document:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canListAssets: permission(action: "core:asset:list", id: $organizationId)
|
||||
canListData: permission(action: "core:datum:list", id: $organizationId)
|
||||
canListAudits: permission(action: "core:audit:list", id: $organizationId)
|
||||
canListNonconformities: permission(
|
||||
action: "core:nonconformity:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canListObligations: permission(
|
||||
action: "core:obligation:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canListContinualImprovements: permission(
|
||||
action: "core:continual-improvement:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canListProcessingActivities: permission(
|
||||
action: "core:processing-activity:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canListStatesOfApplicability: permission(
|
||||
action: "core:state-of-applicability:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canListSnapshots: permission(
|
||||
action: "core:snapshot:list"
|
||||
id: $organizationId
|
||||
)
|
||||
canGetTrustCenter: permission(
|
||||
action: "core:trust-center:get"
|
||||
id: $organizationId
|
||||
)
|
||||
canUpdateOrganization: permission(
|
||||
action: "iam:organization:update"
|
||||
id: $organizationId
|
||||
)
|
||||
}
|
||||
`;
|
||||
|
||||
export function Sidebar(props: { fKey: SidebarFragment$key }) {
|
||||
const { fKey } = props;
|
||||
|
||||
export function Sidebar() {
|
||||
const { __ } = useTranslate();
|
||||
const organizationId = useOrganizationId();
|
||||
|
||||
const { isAuthorized } = use(PermissionsContext);
|
||||
const permissions = useFragment<SidebarFragment$key>(fragment, fKey);
|
||||
|
||||
const prefix = `/organizations/${organizationId}`;
|
||||
|
||||
return (
|
||||
<ul className="space-y-[2px]">
|
||||
{isAuthorized("Organization", "listMeetings") && (
|
||||
{permissions.canListMeetings && (
|
||||
<SidebarItem
|
||||
label={__("Meetings")}
|
||||
icon={IconCalendar1}
|
||||
to={`${prefix}/meetings`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listTasks") && (
|
||||
{permissions.canListTasks && (
|
||||
<SidebarItem
|
||||
label={__("Tasks")}
|
||||
icon={IconInboxEmpty}
|
||||
to={`${prefix}/tasks`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listMeasures") && (
|
||||
{permissions.canListMeasures && (
|
||||
<SidebarItem
|
||||
label={__("Measures")}
|
||||
icon={IconTodo}
|
||||
to={`${prefix}/measures`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listRisks") && (
|
||||
{permissions.canListRisks && (
|
||||
<SidebarItem
|
||||
label={__("Risks")}
|
||||
icon={IconFire3}
|
||||
to={`${prefix}/risks`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listFrameworks") && (
|
||||
{permissions.canListFrameworks && (
|
||||
<SidebarItem
|
||||
label={__("Frameworks")}
|
||||
icon={IconBank}
|
||||
to={`${prefix}/frameworks`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listPeople") && (
|
||||
{permissions.canListPeople && (
|
||||
<SidebarItem
|
||||
label={__("People")}
|
||||
icon={IconGroup1}
|
||||
to={`${prefix}/people`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listVendors") && (
|
||||
{permissions.canListVendors && (
|
||||
<SidebarItem
|
||||
label={__("Vendors")}
|
||||
icon={IconStore}
|
||||
to={`${prefix}/vendors`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listDocuments") && (
|
||||
{permissions.canListDocuments && (
|
||||
<SidebarItem
|
||||
label={__("Documents")}
|
||||
icon={IconPageTextLine}
|
||||
to={`${prefix}/documents`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listAssets") && (
|
||||
{permissions.canListAssets && (
|
||||
<SidebarItem
|
||||
label={__("Assets")}
|
||||
icon={IconBox}
|
||||
to={`${prefix}/assets`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listData") && (
|
||||
{permissions.canListData && (
|
||||
<SidebarItem
|
||||
label={__("Data")}
|
||||
icon={IconListStack}
|
||||
to={`${prefix}/data`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listAudits") && (
|
||||
{permissions.canListAudits && (
|
||||
<SidebarItem
|
||||
label={__("Audits")}
|
||||
icon={IconMedal}
|
||||
to={`${prefix}/audits`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listNonconformities") && (
|
||||
{permissions.canListNonconformities && (
|
||||
<SidebarItem
|
||||
label={__("Nonconformities")}
|
||||
icon={IconCrossLargeX}
|
||||
to={`${prefix}/nonconformities`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listObligations") && (
|
||||
{permissions.canListObligations && (
|
||||
<SidebarItem
|
||||
label={__("Obligations")}
|
||||
icon={IconBook}
|
||||
to={`${prefix}/obligations`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listContinualImprovements") && (
|
||||
{permissions.canListContinualImprovements && (
|
||||
<SidebarItem
|
||||
label={__("Continual Improvements")}
|
||||
icon={IconRotateCw}
|
||||
to={`${prefix}/continual-improvements`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listProcessingActivities") && (
|
||||
{permissions.canListProcessingActivities && (
|
||||
<SidebarItem
|
||||
label={__("Processing Activities")}
|
||||
icon={IconCircleProgress}
|
||||
to={`${prefix}/processing-activities`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listStatesOfApplicability") && (
|
||||
{permissions.canListStatesOfApplicability && (
|
||||
<SidebarItem
|
||||
label={__("States of Applicability")}
|
||||
icon={IconPageCheck}
|
||||
to={`${prefix}/states-of-applicability`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listSnapshots") && (
|
||||
{permissions.canListSnapshots && (
|
||||
<SidebarItem
|
||||
label={__("Snapshots")}
|
||||
icon={IconClock}
|
||||
to={`${prefix}/snapshots`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "getTrustCenter") && (
|
||||
{permissions.canGetTrustCenter && (
|
||||
<SidebarItem
|
||||
label={__("Trust Center")}
|
||||
icon={IconShield}
|
||||
to={`${prefix}/trust-center`}
|
||||
/>
|
||||
)}
|
||||
{isAuthorized("Organization", "listMembers") && (
|
||||
{permissions.canUpdateOrganization && (
|
||||
<SidebarItem
|
||||
label={__("Settings")}
|
||||
icon={IconSettingsGear2}
|
||||
|
||||
332
apps/console/src/pages/iam/memberships/_components/__generated__/SidebarFragment.graphql.ts
generated
Normal file
332
apps/console/src/pages/iam/memberships/_components/__generated__/SidebarFragment.graphql.ts
generated
Normal file
@@ -0,0 +1,332 @@
|
||||
/**
|
||||
* @generated SignedSource<<d7cb6d45a4e2a8960d1984e0e1f74b0a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type SidebarFragment$data = {
|
||||
readonly canGetTrustCenter: boolean;
|
||||
readonly canListAssets: boolean;
|
||||
readonly canListAudits: boolean;
|
||||
readonly canListContinualImprovements: boolean;
|
||||
readonly canListData: boolean;
|
||||
readonly canListDocuments: boolean;
|
||||
readonly canListFrameworks: boolean;
|
||||
readonly canListMeasures: boolean;
|
||||
readonly canListMeetings: boolean;
|
||||
readonly canListNonconformities: boolean;
|
||||
readonly canListObligations: boolean;
|
||||
readonly canListPeople: boolean;
|
||||
readonly canListProcessingActivities: boolean;
|
||||
readonly canListRisks: boolean;
|
||||
readonly canListSnapshots: boolean;
|
||||
readonly canListStatesOfApplicability: boolean;
|
||||
readonly canListTasks: boolean;
|
||||
readonly canListVendors: boolean;
|
||||
readonly canUpdateOrganization: boolean;
|
||||
readonly " $fragmentType": "SidebarFragment";
|
||||
};
|
||||
export type SidebarFragment$key = {
|
||||
readonly " $data"?: SidebarFragment$data;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"SidebarFragment">;
|
||||
};
|
||||
|
||||
const node: ReaderFragment = (function(){
|
||||
var v0 = {
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
};
|
||||
return {
|
||||
"argumentDefinitions": [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "organizationId"
|
||||
}
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "SidebarFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "canListMeetings",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:meeting:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListTasks",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:task:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListMeasures",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:measures:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListRisks",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:risk:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListFrameworks",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:frameworks:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListPeople",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:people:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListVendors",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:vendor:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListDocuments",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:document:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListAssets",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:asset:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListData",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:datum:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListAudits",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:audit:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListNonconformities",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:nonconformity:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListObligations",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:obligation:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListContinualImprovements",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:continual-improvement:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListProcessingActivities",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:processing-activity:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListStatesOfApplicability",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canListSnapshots",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:snapshot:list"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canGetTrustCenter",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:trust-center:get"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canUpdateOrganization",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "iam:organization:update"
|
||||
},
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Identity",
|
||||
"abstractKey": null
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "a116eb6c3f1c2808f90316b34ef43979";
|
||||
|
||||
export default node;
|
||||
@@ -49,6 +49,7 @@ const (
|
||||
|
||||
// Membership actions
|
||||
ActionIAMMembershipGet = "iam:membership:get"
|
||||
ActionIAMMembershipLit = "iam:membership:list"
|
||||
ActionIAMMembershipUpdate = "iam:membership:update"
|
||||
|
||||
// Personal API Key actions
|
||||
|
||||
Reference in New Issue
Block a user