Expose permission field on each core schema node implementation
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -15,22 +15,11 @@
|
|||||||
"eagerEsModules": true,
|
"eagerEsModules": true,
|
||||||
"noFutureProofEnums": true,
|
"noFutureProofEnums": true,
|
||||||
"output": "apps/console/src/__generated__/core",
|
"output": "apps/console/src/__generated__/core",
|
||||||
"relativizeJsModulePaths": false,
|
"relativizeJsModulePaths": false
|
||||||
"excludesExtensions": ["*.iam.ts"]
|
|
||||||
},
|
|
||||||
"inline-iam": {
|
|
||||||
"base": "core",
|
|
||||||
"schema": "pkg/server/api/connect/v1/schema.graphql",
|
|
||||||
"language": "typescript",
|
|
||||||
"eagerEsModules": true,
|
|
||||||
"noFutureProofEnums": true,
|
|
||||||
"output": "apps/console/src/__generated__/iam",
|
|
||||||
"relativizeJsModulePaths": false,
|
|
||||||
"excludesExtensions": ["*.tsx", "**/hooks/**.ts"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sources": {
|
"sources": {
|
||||||
"apps/console/src/pages/iam": "iam",
|
"apps/console/src/pages/iam": "iam",
|
||||||
"apps/console/src": ["core", "inline-iam"]
|
"apps/console/src": "core"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<efdbeab080fabb165a3a169fbedf3d8f>>
|
* @generated SignedSource<<ab516d36b92795ed8d94d69153957f93>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -12,6 +12,7 @@ import { ReaderFragment } from 'relay-runtime';
|
|||||||
export type SSLStatus = "ACTIVE" | "EXPIRED" | "FAILED" | "PENDING" | "PROVISIONING" | "RENEWING";
|
export type SSLStatus = "ACTIVE" | "EXPIRED" | "FAILED" | "PENDING" | "PROVISIONING" | "RENEWING";
|
||||||
import { FragmentRefs } from "relay-runtime";
|
import { FragmentRefs } from "relay-runtime";
|
||||||
export type DomainCardFragment$data = {
|
export type DomainCardFragment$data = {
|
||||||
|
readonly canDelete: boolean;
|
||||||
readonly domain: string;
|
readonly domain: string;
|
||||||
readonly sslStatus: SSLStatus;
|
readonly sslStatus: SSLStatus;
|
||||||
readonly " $fragmentSpreads": FragmentRefs<"DomainDialogFragment">;
|
readonly " $fragmentSpreads": FragmentRefs<"DomainDialogFragment">;
|
||||||
@@ -42,6 +43,19 @@ const node: ReaderFragment = {
|
|||||||
"name": "sslStatus",
|
"name": "sslStatus",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": "canDelete",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "action",
|
||||||
|
"value": "core:custom-domain:delete"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "permission",
|
||||||
|
"storageKey": "permission(action:\"core:custom-domain:delete\")"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "FragmentSpread",
|
"kind": "FragmentSpread",
|
||||||
@@ -52,6 +66,6 @@ const node: ReaderFragment = {
|
|||||||
"abstractKey": null
|
"abstractKey": null
|
||||||
};
|
};
|
||||||
|
|
||||||
(node as any).hash = "672098f5351cf031d958263155e180ac";
|
(node as any).hash = "91cc7871d5ac257f2540568a9a10ce0f";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<04a0aa6648637fd8e81b371ffd8ef9fb>>
|
* @generated SignedSource<<ad1c20b90e9f5335bbcd703dc4e19963>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -16,6 +16,7 @@ export type DomainSettingsPageQuery$variables = {
|
|||||||
export type DomainSettingsPageQuery$data = {
|
export type DomainSettingsPageQuery$data = {
|
||||||
readonly organization: {
|
readonly organization: {
|
||||||
readonly __typename: "Organization";
|
readonly __typename: "Organization";
|
||||||
|
readonly canCreateCustomDomain: boolean;
|
||||||
readonly customDomain: {
|
readonly customDomain: {
|
||||||
readonly domain: string;
|
readonly domain: string;
|
||||||
readonly " $fragmentSpreads": FragmentRefs<"DomainCardFragment">;
|
readonly " $fragmentSpreads": FragmentRefs<"DomainCardFragment">;
|
||||||
@@ -62,6 +63,19 @@ v3 = {
|
|||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v4 = {
|
v4 = {
|
||||||
|
"alias": "canCreateCustomDomain",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "action",
|
||||||
|
"value": "core:custom-domain:create"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "permission",
|
||||||
|
"storageKey": "permission(action:\"core:custom-domain:create\")"
|
||||||
|
},
|
||||||
|
v5 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
@@ -88,6 +102,7 @@ return {
|
|||||||
"kind": "InlineFragment",
|
"kind": "InlineFragment",
|
||||||
"selections": [
|
"selections": [
|
||||||
(v3/*: any*/),
|
(v3/*: any*/),
|
||||||
|
(v4/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -96,7 +111,7 @@ return {
|
|||||||
"name": "customDomain",
|
"name": "customDomain",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v4/*: any*/),
|
(v5/*: any*/),
|
||||||
{
|
{
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "FragmentSpread",
|
"kind": "FragmentSpread",
|
||||||
@@ -135,6 +150,7 @@ return {
|
|||||||
{
|
{
|
||||||
"kind": "InlineFragment",
|
"kind": "InlineFragment",
|
||||||
"selections": [
|
"selections": [
|
||||||
|
(v4/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -143,7 +159,7 @@ return {
|
|||||||
"name": "customDomain",
|
"name": "customDomain",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v4/*: any*/),
|
(v5/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -151,6 +167,19 @@ return {
|
|||||||
"name": "sslStatus",
|
"name": "sslStatus",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": "canDelete",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "action",
|
||||||
|
"value": "core:custom-domain:delete"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "permission",
|
||||||
|
"storageKey": "permission(action:\"core:custom-domain:delete\")"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -232,16 +261,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "561dce9d969f951c2c5b0a2a5fecf29a",
|
"cacheID": "36529612fbe4366a7344b405031da1d1",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "DomainSettingsPageQuery",
|
"name": "DomainSettingsPageQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query DomainSettingsPageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n customDomain {\n domain\n ...DomainCardFragment\n id\n }\n }\n id\n }\n}\n\nfragment DomainCardFragment on CustomDomain {\n domain\n sslStatus\n ...DomainDialogFragment\n}\n\nfragment DomainDialogFragment on CustomDomain {\n sslStatus\n domain\n dnsRecords {\n type\n name\n value\n ttl\n purpose\n }\n createdAt\n updatedAt\n sslExpiresAt\n}\n"
|
"text": "query DomainSettingsPageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n canCreateCustomDomain: permission(action: \"core:custom-domain:create\")\n customDomain {\n domain\n ...DomainCardFragment\n id\n }\n }\n id\n }\n}\n\nfragment DomainCardFragment on CustomDomain {\n domain\n sslStatus\n canDelete: permission(action: \"core:custom-domain:delete\")\n ...DomainDialogFragment\n}\n\nfragment DomainDialogFragment on CustomDomain {\n sslStatus\n domain\n dnsRecords {\n type\n name\n value\n ttl\n purpose\n }\n createdAt\n updatedAt\n sslExpiresAt\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "6b7bab65eca55ec2f132cd5944fe874e";
|
(node as any).hash = "75275e2fc7e7156cdf3059b8f0d4f60d";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,136 +0,0 @@
|
|||||||
/**
|
|
||||||
* @generated SignedSource<<2c18e7bff6b76551479def8a10cce183>>
|
|
||||||
* @lightSyntaxTransform
|
|
||||||
* @nogrep
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
// @ts-nocheck
|
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
|
||||||
export type domainSettingsPage_permissionsQuery$variables = {
|
|
||||||
organizationId: string;
|
|
||||||
};
|
|
||||||
export type domainSettingsPage_permissionsQuery$data = {
|
|
||||||
readonly viewer: {
|
|
||||||
readonly canCreateCustomDomain: boolean;
|
|
||||||
readonly canDeleteCustomDomain: boolean;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
export type domainSettingsPage_permissionsQuery = {
|
|
||||||
response: domainSettingsPage_permissionsQuery$data;
|
|
||||||
variables: domainSettingsPage_permissionsQuery$variables;
|
|
||||||
};
|
|
||||||
|
|
||||||
const node: ConcreteRequest = (function(){
|
|
||||||
var v0 = [
|
|
||||||
{
|
|
||||||
"defaultValue": null,
|
|
||||||
"kind": "LocalArgument",
|
|
||||||
"name": "organizationId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
v1 = {
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "id",
|
|
||||||
"variableName": "organizationId"
|
|
||||||
},
|
|
||||||
v2 = {
|
|
||||||
"alias": "canCreateCustomDomain",
|
|
||||||
"args": [
|
|
||||||
{
|
|
||||||
"kind": "Literal",
|
|
||||||
"name": "action",
|
|
||||||
"value": "core:custom-domain:create"
|
|
||||||
},
|
|
||||||
(v1/*: any*/)
|
|
||||||
],
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "permission",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
v3 = {
|
|
||||||
"alias": "canDeleteCustomDomain",
|
|
||||||
"args": [
|
|
||||||
{
|
|
||||||
"kind": "Literal",
|
|
||||||
"name": "action",
|
|
||||||
"value": "core:custom-domain:delete"
|
|
||||||
},
|
|
||||||
(v1/*: any*/)
|
|
||||||
],
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "permission",
|
|
||||||
"storageKey": null
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
"fragment": {
|
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
|
||||||
"kind": "Fragment",
|
|
||||||
"metadata": null,
|
|
||||||
"name": "domainSettingsPage_permissionsQuery",
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"kind": "RequiredField",
|
|
||||||
"field": {
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"concreteType": "Identity",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "viewer",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
(v2/*: any*/),
|
|
||||||
(v3/*: any*/)
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
"action": "THROW"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "Query",
|
|
||||||
"abstractKey": null
|
|
||||||
},
|
|
||||||
"kind": "Request",
|
|
||||||
"operation": {
|
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
|
||||||
"kind": "Operation",
|
|
||||||
"name": "domainSettingsPage_permissionsQuery",
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"concreteType": "Identity",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "viewer",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
(v2/*: any*/),
|
|
||||||
(v3/*: any*/),
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "id",
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"params": {
|
|
||||||
"cacheID": "bb016bc1f53b609efc4ac93a93653d08",
|
|
||||||
"id": null,
|
|
||||||
"metadata": {},
|
|
||||||
"name": "domainSettingsPage_permissionsQuery",
|
|
||||||
"operationKind": "query",
|
|
||||||
"text": "query domainSettingsPage_permissionsQuery(\n $organizationId: ID!\n) {\n viewer {\n canCreateCustomDomain: permission(action: \"core:custom-domain:create\", id: $organizationId)\n canDeleteCustomDomain: permission(action: \"core:custom-domain:delete\", id: $organizationId)\n id\n }\n}\n"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
(node as any).hash = "f09bdc9336bf1ad1339bb3b60987f53f";
|
|
||||||
|
|
||||||
export default node;
|
|
||||||
@@ -5,8 +5,6 @@ import { useTranslate } from "@probo/i18n";
|
|||||||
import { DomainCard } from "./_components/DomainCard";
|
import { DomainCard } from "./_components/DomainCard";
|
||||||
import { NewDomainDialog } from "./_components/NewDomainDialog";
|
import { NewDomainDialog } from "./_components/NewDomainDialog";
|
||||||
import { Button, Card, IconPlusLarge } from "@probo/ui";
|
import { Button, Card, IconPlusLarge } from "@probo/ui";
|
||||||
import { PermissionsContext } from "/providers/NewPermissionsContext";
|
|
||||||
import { use } from "react";
|
|
||||||
|
|
||||||
export const domainSettingsPageQuery = graphql`
|
export const domainSettingsPageQuery = graphql`
|
||||||
query DomainSettingsPageQuery($organizationId: ID!) {
|
query DomainSettingsPageQuery($organizationId: ID!) {
|
||||||
@@ -14,6 +12,7 @@ export const domainSettingsPageQuery = graphql`
|
|||||||
__typename
|
__typename
|
||||||
... on Organization {
|
... on Organization {
|
||||||
id
|
id
|
||||||
|
canCreateCustomDomain: permission(action: "core:custom-domain:create")
|
||||||
customDomain {
|
customDomain {
|
||||||
domain
|
domain
|
||||||
...DomainCardFragment
|
...DomainCardFragment
|
||||||
@@ -29,7 +28,6 @@ export function DomainSettingsPage(props: {
|
|||||||
const { queryRef } = props;
|
const { queryRef } = props;
|
||||||
|
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const { canCreateCustomDomain } = use(PermissionsContext);
|
|
||||||
|
|
||||||
const { organization } = usePreloadedQuery<DomainSettingsPageQuery>(
|
const { organization } = usePreloadedQuery<DomainSettingsPageQuery>(
|
||||||
domainSettingsPageQuery,
|
domainSettingsPageQuery,
|
||||||
@@ -56,7 +54,7 @@ export function DomainSettingsPage(props: {
|
|||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
{canCreateCustomDomain && (
|
{organization.canCreateCustomDomain && (
|
||||||
<NewDomainDialog>
|
<NewDomainDialog>
|
||||||
<Button icon={IconPlusLarge}>{__("Add Domain")}</Button>
|
<Button icon={IconPlusLarge}>{__("Add Domain")}</Button>
|
||||||
</NewDomainDialog>
|
</NewDomainDialog>
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import {
|
|||||||
import { useQueryLoader } from "react-relay";
|
import { useQueryLoader } from "react-relay";
|
||||||
import { CoreRelayProvider } from "/providers/CoreRelayProvider";
|
import { CoreRelayProvider } from "/providers/CoreRelayProvider";
|
||||||
import type { DomainSettingsPageQuery } from "/__generated__/core/DomainSettingsPageQuery.graphql";
|
import type { DomainSettingsPageQuery } from "/__generated__/core/DomainSettingsPageQuery.graphql";
|
||||||
import { PermissionsProviderLoader } from "/providers/NewPermissionsProvider";
|
|
||||||
import { IAMRelayProvider } from "/providers/IAMRelayProvider";
|
|
||||||
import { domainSettingsPagePermissionsQuery } from "./domainSettingsPage.iam";
|
|
||||||
import type { domainSettingsPage_permissionsQuery } from "/__generated__/iam/domainSettingsPage_permissionsQuery.graphql";
|
|
||||||
|
|
||||||
function DomainSettingsPageLoader() {
|
function DomainSettingsPageLoader() {
|
||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
@@ -33,16 +29,10 @@ function DomainSettingsPageLoader() {
|
|||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
return (
|
return (
|
||||||
<IAMRelayProvider>
|
<CoreRelayProvider>
|
||||||
<PermissionsProviderLoader<domainSettingsPage_permissionsQuery>
|
<Suspense>
|
||||||
query={domainSettingsPagePermissionsQuery}
|
<DomainSettingsPageLoader />
|
||||||
>
|
</Suspense>
|
||||||
<CoreRelayProvider>
|
</CoreRelayProvider>
|
||||||
<Suspense>
|
|
||||||
<DomainSettingsPageLoader />
|
|
||||||
</Suspense>
|
|
||||||
</CoreRelayProvider>
|
|
||||||
</PermissionsProviderLoader>
|
|
||||||
</IAMRelayProvider>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,13 +9,12 @@ import { graphql } from "relay-runtime";
|
|||||||
import { useFragment } from "react-relay";
|
import { useFragment } from "react-relay";
|
||||||
import type { DomainCardFragment$key } from "/__generated__/core/DomainCardFragment.graphql";
|
import type { DomainCardFragment$key } from "/__generated__/core/DomainCardFragment.graphql";
|
||||||
import { DeleteDomainDialog } from "./DeleteDomainDialog";
|
import { DeleteDomainDialog } from "./DeleteDomainDialog";
|
||||||
import { use } from "react";
|
|
||||||
import { PermissionsContext } from "/providers/NewPermissionsContext";
|
|
||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment DomainCardFragment on CustomDomain {
|
fragment DomainCardFragment on CustomDomain {
|
||||||
domain
|
domain
|
||||||
sslStatus
|
sslStatus
|
||||||
|
canDelete: permission(action: "core:custom-domain:delete")
|
||||||
...DomainDialogFragment
|
...DomainDialogFragment
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -24,7 +23,6 @@ export function DomainCard(props: { fKey: DomainCardFragment$key }) {
|
|||||||
const { fKey } = props;
|
const { fKey } = props;
|
||||||
|
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const { canDeleteCustomDomain } = use(PermissionsContext);
|
|
||||||
|
|
||||||
const domain = useFragment<DomainCardFragment$key>(fragment, fKey);
|
const domain = useFragment<DomainCardFragment$key>(fragment, fKey);
|
||||||
|
|
||||||
@@ -53,7 +51,7 @@ export function DomainCard(props: { fKey: DomainCardFragment$key }) {
|
|||||||
<Button variant="secondary">{__("View Details")}</Button>
|
<Button variant="secondary">{__("View Details")}</Button>
|
||||||
</DomainDialog>
|
</DomainDialog>
|
||||||
|
|
||||||
{canDeleteCustomDomain && (
|
{domain.canDelete && (
|
||||||
<DeleteDomainDialog domain={domain.domain}>
|
<DeleteDomainDialog domain={domain.domain}>
|
||||||
<Button variant="danger">{__("Delete")}</Button>
|
<Button variant="danger">{__("Delete")}</Button>
|
||||||
</DeleteDomainDialog>
|
</DeleteDomainDialog>
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
import { graphql } from "relay-runtime";
|
|
||||||
|
|
||||||
export const domainSettingsPagePermissionsQuery = graphql`
|
|
||||||
query domainSettingsPage_permissionsQuery($organizationId: ID!) {
|
|
||||||
viewer @required(action: THROW) {
|
|
||||||
canCreateCustomDomain: permission(
|
|
||||||
action: "core:custom-domain:create"
|
|
||||||
id: $organizationId
|
|
||||||
)
|
|
||||||
canDeleteCustomDomain: permission(
|
|
||||||
action: "core:custom-domain:delete"
|
|
||||||
id: $organizationId
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
@@ -7,7 +7,7 @@ import { fileURLToPath, URL } from "node:url";
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
react({
|
react({
|
||||||
exclude: ["src/pages/iam/**/*", "src/pages/**/*.iam.ts"],
|
exclude: ["src/pages/iam/**/*"],
|
||||||
babel: {
|
babel: {
|
||||||
plugins: [
|
plugins: [
|
||||||
[
|
[
|
||||||
@@ -21,7 +21,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
react({
|
react({
|
||||||
include: ["src/pages/iam/**/*", "src/pages/**/*.iam.ts"],
|
include: ["src/pages/iam/**/*"],
|
||||||
babel: {
|
babel: {
|
||||||
plugins: [
|
plugins: [
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -1400,15 +1400,3 @@ type sAMLConfigurationResolver struct{ *Resolver }
|
|||||||
type sAMLConfigurationConnectionResolver struct{ *Resolver }
|
type sAMLConfigurationConnectionResolver struct{ *Resolver }
|
||||||
type sessionResolver struct{ *Resolver }
|
type sessionResolver struct{ *Resolver }
|
||||||
type sessionConnectionResolver struct{ *Resolver }
|
type sessionConnectionResolver struct{ *Resolver }
|
||||||
|
|
||||||
// !!! WARNING !!!
|
|
||||||
// The code below was going to be deleted when updating resolvers. It has been copied here so you have
|
|
||||||
// one last chance to move it out of harms way if you want. There are two reasons this happens:
|
|
||||||
// - When renaming or deleting a resolver the old code will be put in here. You can safely delete
|
|
||||||
// it when you're done.
|
|
||||||
// - You have helper methods in this file. Move them out to keep these resolver files clean.
|
|
||||||
/*
|
|
||||||
func (r *mutationResolver) UpdatePersonalAPIKey(ctx context.Context, input types.UpdatePersonalAPIKeyInput) (*types.UpdatePersonalAPIKeyPayload, error) {
|
|
||||||
panic(fmt.Errorf("not implemented: UpdatePersonalAPIKey - updatePersonalAPIKey"))
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package console_v1
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -39,6 +40,7 @@ import (
|
|||||||
"go.probo.inc/probo/pkg/securecookie"
|
"go.probo.inc/probo/pkg/securecookie"
|
||||||
connect_v1 "go.probo.inc/probo/pkg/server/api/connect/v1"
|
connect_v1 "go.probo.inc/probo/pkg/server/api/connect/v1"
|
||||||
"go.probo.inc/probo/pkg/server/api/console/v1/schema"
|
"go.probo.inc/probo/pkg/server/api/console/v1/schema"
|
||||||
|
"go.probo.inc/probo/pkg/server/api/console/v1/types"
|
||||||
"go.probo.inc/probo/pkg/server/gqlutils"
|
"go.probo.inc/probo/pkg/server/gqlutils"
|
||||||
"go.probo.inc/probo/pkg/statelesstoken"
|
"go.probo.inc/probo/pkg/statelesstoken"
|
||||||
)
|
)
|
||||||
@@ -330,3 +332,38 @@ func (r *Resolver) MustAuthorize(ctx context.Context, entityID gid.GID, action i
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *Resolver) Permission(ctx context.Context, obj types.Node, action string) (bool, error) {
|
||||||
|
identity := connect_v1.IdentityFromContext(ctx)
|
||||||
|
|
||||||
|
err := r.iam.Authorizer.Authorize(
|
||||||
|
ctx,
|
||||||
|
iam.AuthorizeParams{
|
||||||
|
Principal: identity.ID,
|
||||||
|
Resource: obj.GetID(),
|
||||||
|
Action: action,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
var errInsufficientPermissions *iam.ErrInsufficientPermissions
|
||||||
|
if errors.As(err, &errInsufficientPermissions) {
|
||||||
|
graphql.AddError(
|
||||||
|
ctx,
|
||||||
|
&gqlerror.Error{
|
||||||
|
Path: graphql.GetPath(ctx),
|
||||||
|
Message: err.Error(),
|
||||||
|
Extensions: map[string]interface{}{
|
||||||
|
"code": "UNAUTHORIZED",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
panic(fmt.Errorf("cannot authorize: %w", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -1494,6 +1494,8 @@ type TrustCenter implements Node {
|
|||||||
before: CursorKey
|
before: CursorKey
|
||||||
orderBy: TrustCenterReferenceOrder
|
orderBy: TrustCenterReferenceOrder
|
||||||
): TrustCenterReferenceConnection! @goField(forceResolver: true)
|
): TrustCenterReferenceConnection! @goField(forceResolver: true)
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Organization implements Node {
|
type Organization implements Node {
|
||||||
@@ -1712,6 +1714,8 @@ type Organization implements Node {
|
|||||||
|
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SlackConnection {
|
type SlackConnection {
|
||||||
@@ -1743,6 +1747,8 @@ type People implements Node {
|
|||||||
contractEndDate: Datetime
|
contractEndDate: Datetime
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Vendor implements Node {
|
type Vendor implements Node {
|
||||||
@@ -1810,6 +1816,8 @@ type Vendor implements Node {
|
|||||||
showOnTrustCenter: Boolean!
|
showOnTrustCenter: Boolean!
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type VendorComplianceReport implements Node {
|
type VendorComplianceReport implements Node {
|
||||||
@@ -1821,6 +1829,8 @@ type VendorComplianceReport implements Node {
|
|||||||
file: File @goField(forceResolver: true)
|
file: File @goField(forceResolver: true)
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type VendorBusinessAssociateAgreement implements Node {
|
type VendorBusinessAssociateAgreement implements Node {
|
||||||
@@ -1833,6 +1843,8 @@ type VendorBusinessAssociateAgreement implements Node {
|
|||||||
fileSize: BigInt!
|
fileSize: BigInt!
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type VendorContact implements Node {
|
type VendorContact implements Node {
|
||||||
@@ -1844,6 +1856,8 @@ type VendorContact implements Node {
|
|||||||
role: String
|
role: String
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type VendorService implements Node {
|
type VendorService implements Node {
|
||||||
@@ -1853,6 +1867,8 @@ type VendorService implements Node {
|
|||||||
description: String
|
description: String
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type VendorDataPrivacyAgreement implements Node {
|
type VendorDataPrivacyAgreement implements Node {
|
||||||
@@ -1865,6 +1881,8 @@ type VendorDataPrivacyAgreement implements Node {
|
|||||||
fileSize: BigInt!
|
fileSize: BigInt!
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Framework implements Node {
|
type Framework implements Node {
|
||||||
@@ -1887,6 +1905,8 @@ type Framework implements Node {
|
|||||||
|
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Control implements Node {
|
type Control implements Node {
|
||||||
@@ -1954,6 +1974,8 @@ type Control implements Node {
|
|||||||
|
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Measure implements Node {
|
type Measure implements Node {
|
||||||
@@ -1999,6 +2021,8 @@ type Measure implements Node {
|
|||||||
|
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Task implements Node {
|
type Task implements Node {
|
||||||
@@ -2023,6 +2047,8 @@ type Task implements Node {
|
|||||||
|
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Evidence implements Node {
|
type Evidence implements Node {
|
||||||
@@ -2039,6 +2065,8 @@ type Evidence implements Node {
|
|||||||
|
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Document implements Node {
|
type Document implements Node {
|
||||||
@@ -2072,6 +2100,8 @@ type Document implements Node {
|
|||||||
|
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SignableDocument
|
type SignableDocument
|
||||||
@@ -2107,6 +2137,8 @@ type Meeting implements Node {
|
|||||||
organization: Organization! @goField(forceResolver: true)
|
organization: Organization! @goField(forceResolver: true)
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type StateOfApplicability implements Node {
|
type StateOfApplicability implements Node {
|
||||||
@@ -2186,6 +2218,8 @@ type Risk implements Node {
|
|||||||
|
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Audit implements Node {
|
type Audit implements Node {
|
||||||
@@ -2211,6 +2245,8 @@ type Audit implements Node {
|
|||||||
trustCenterVisibility: TrustCenterVisibility!
|
trustCenterVisibility: TrustCenterVisibility!
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Nonconformity implements Node {
|
type Nonconformity implements Node {
|
||||||
@@ -2229,6 +2265,8 @@ type Nonconformity implements Node {
|
|||||||
effectivenessCheck: String
|
effectivenessCheck: String
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Obligation implements Node {
|
type Obligation implements Node {
|
||||||
@@ -2248,6 +2286,8 @@ type Obligation implements Node {
|
|||||||
type: ObligationType!
|
type: ObligationType!
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContinualImprovement implements Node {
|
type ContinualImprovement implements Node {
|
||||||
@@ -2264,6 +2304,8 @@ type ContinualImprovement implements Node {
|
|||||||
priority: ContinualImprovementPriority!
|
priority: ContinualImprovementPriority!
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type RightsRequest implements Node {
|
type RightsRequest implements Node {
|
||||||
@@ -2317,6 +2359,8 @@ type ProcessingActivity implements Node {
|
|||||||
@goField(forceResolver: true)
|
@goField(forceResolver: true)
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type DataProtectionImpactAssessment implements Node {
|
type DataProtectionImpactAssessment implements Node {
|
||||||
@@ -2330,6 +2374,8 @@ type DataProtectionImpactAssessment implements Node {
|
|||||||
residualRisk: DataProtectionImpactAssessmentResidualRisk
|
residualRisk: DataProtectionImpactAssessmentResidualRisk
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type TransferImpactAssessment implements Node {
|
type TransferImpactAssessment implements Node {
|
||||||
@@ -2343,6 +2389,8 @@ type TransferImpactAssessment implements Node {
|
|||||||
supplementaryMeasures: String
|
supplementaryMeasures: String
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Snapshot implements Node {
|
type Snapshot implements Node {
|
||||||
@@ -2362,6 +2410,8 @@ type Snapshot implements Node {
|
|||||||
): ControlConnection! @goField(forceResolver: true)
|
): ControlConnection! @goField(forceResolver: true)
|
||||||
|
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Report implements Node {
|
type Report implements Node {
|
||||||
@@ -2374,6 +2424,8 @@ type Report implements Node {
|
|||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
audit: Audit @goField(forceResolver: true)
|
audit: Audit @goField(forceResolver: true)
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Session {
|
type Session {
|
||||||
@@ -2425,6 +2477,8 @@ type TrustCenterAccess implements Node {
|
|||||||
before: CursorKey
|
before: CursorKey
|
||||||
orderBy: TrustCenterDocumentAccessOrder
|
orderBy: TrustCenterDocumentAccessOrder
|
||||||
): TrustCenterDocumentAccessConnection! @goField(forceResolver: true)
|
): TrustCenterDocumentAccessConnection! @goField(forceResolver: true)
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type TrustCenterDocumentAccess
|
type TrustCenterDocumentAccess
|
||||||
@@ -2471,6 +2525,8 @@ type TrustCenterReference implements Node {
|
|||||||
rank: Int!
|
rank: Int!
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type TrustCenterReferenceConnection
|
type TrustCenterReferenceConnection
|
||||||
@@ -4557,6 +4613,8 @@ type VendorRiskAssessment implements Node {
|
|||||||
notes: String
|
notes: String
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum VendorRiskAssessmentOrderField
|
enum VendorRiskAssessmentOrderField
|
||||||
@@ -4679,6 +4737,8 @@ type DocumentVersionSignature implements Node {
|
|||||||
requestedAt: Datetime!
|
requestedAt: Datetime!
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
input RequestSignatureInput {
|
input RequestSignatureInput {
|
||||||
@@ -4831,6 +4891,8 @@ type Asset implements Node {
|
|||||||
organization: Organization! @goField(forceResolver: true)
|
organization: Organization! @goField(forceResolver: true)
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type AssetConnection
|
type AssetConnection
|
||||||
@@ -5100,6 +5162,8 @@ type CustomDomain implements Node {
|
|||||||
dnsRecords: [DNSRecordInstruction!]!
|
dnsRecords: [DNSRecordInstruction!]!
|
||||||
createdAt: Datetime!
|
createdAt: Datetime!
|
||||||
updatedAt: Datetime!
|
updatedAt: Datetime!
|
||||||
|
|
||||||
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
type DNSRecordInstruction {
|
type DNSRecordInstruction {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,7 @@ type Asset struct {
|
|||||||
Organization *Organization `json:"organization"`
|
Organization *Organization `json:"organization"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Asset) IsNode() {}
|
func (Asset) IsNode() {}
|
||||||
@@ -66,6 +67,7 @@ type Audit struct {
|
|||||||
TrustCenterVisibility coredata.TrustCenterVisibility `json:"trustCenterVisibility"`
|
TrustCenterVisibility coredata.TrustCenterVisibility `json:"trustCenterVisibility"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Audit) IsNode() {}
|
func (Audit) IsNode() {}
|
||||||
@@ -152,6 +154,7 @@ type ContinualImprovement struct {
|
|||||||
Priority coredata.ContinualImprovementPriority `json:"priority"`
|
Priority coredata.ContinualImprovementPriority `json:"priority"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ContinualImprovement) IsNode() {}
|
func (ContinualImprovement) IsNode() {}
|
||||||
@@ -184,6 +187,7 @@ type Control struct {
|
|||||||
StateOfApplicabilityControls *StateOfApplicabilityControlConnection `json:"stateOfApplicabilityControls"`
|
StateOfApplicabilityControls *StateOfApplicabilityControlConnection `json:"stateOfApplicabilityControls"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Control) IsNode() {}
|
func (Control) IsNode() {}
|
||||||
@@ -716,6 +720,7 @@ type CustomDomain struct {
|
|||||||
DNSRecords []*DNSRecordInstruction `json:"dnsRecords"`
|
DNSRecords []*DNSRecordInstruction `json:"dnsRecords"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (CustomDomain) IsNode() {}
|
func (CustomDomain) IsNode() {}
|
||||||
@@ -740,6 +745,7 @@ type DataProtectionImpactAssessment struct {
|
|||||||
ResidualRisk *coredata.DataProtectionImpactAssessmentResidualRisk `json:"residualRisk,omitempty"`
|
ResidualRisk *coredata.DataProtectionImpactAssessmentResidualRisk `json:"residualRisk,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (DataProtectionImpactAssessment) IsNode() {}
|
func (DataProtectionImpactAssessment) IsNode() {}
|
||||||
@@ -1140,6 +1146,7 @@ type Document struct {
|
|||||||
Controls *ControlConnection `json:"controls"`
|
Controls *ControlConnection `json:"controls"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Document) IsNode() {}
|
func (Document) IsNode() {}
|
||||||
@@ -1177,6 +1184,7 @@ type DocumentVersionSignature struct {
|
|||||||
RequestedAt time.Time `json:"requestedAt"`
|
RequestedAt time.Time `json:"requestedAt"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (DocumentVersionSignature) IsNode() {}
|
func (DocumentVersionSignature) IsNode() {}
|
||||||
@@ -1213,6 +1221,7 @@ type Evidence struct {
|
|||||||
Measure *Measure `json:"measure"`
|
Measure *Measure `json:"measure"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Evidence) IsNode() {}
|
func (Evidence) IsNode() {}
|
||||||
@@ -1305,6 +1314,7 @@ type Framework struct {
|
|||||||
DarkLogoURL *string `json:"darkLogoURL,omitempty"`
|
DarkLogoURL *string `json:"darkLogoURL,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Framework) IsNode() {}
|
func (Framework) IsNode() {}
|
||||||
@@ -1380,6 +1390,7 @@ type Measure struct {
|
|||||||
Controls *ControlConnection `json:"controls"`
|
Controls *ControlConnection `json:"controls"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Measure) IsNode() {}
|
func (Measure) IsNode() {}
|
||||||
@@ -1404,6 +1415,7 @@ type Meeting struct {
|
|||||||
Organization *Organization `json:"organization"`
|
Organization *Organization `json:"organization"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Meeting) IsNode() {}
|
func (Meeting) IsNode() {}
|
||||||
@@ -1433,6 +1445,7 @@ type Nonconformity struct {
|
|||||||
EffectivenessCheck *string `json:"effectivenessCheck,omitempty"`
|
EffectivenessCheck *string `json:"effectivenessCheck,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Nonconformity) IsNode() {}
|
func (Nonconformity) IsNode() {}
|
||||||
@@ -1464,6 +1477,7 @@ type Obligation struct {
|
|||||||
Type coredata.ObligationType `json:"type"`
|
Type coredata.ObligationType `json:"type"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Obligation) IsNode() {}
|
func (Obligation) IsNode() {}
|
||||||
@@ -1515,6 +1529,7 @@ type Organization struct {
|
|||||||
CustomDomain *CustomDomain `json:"customDomain,omitempty"`
|
CustomDomain *CustomDomain `json:"customDomain,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Organization) IsNode() {}
|
func (Organization) IsNode() {}
|
||||||
@@ -1548,6 +1563,7 @@ type People struct {
|
|||||||
ContractEndDate *time.Time `json:"contractEndDate,omitempty"`
|
ContractEndDate *time.Time `json:"contractEndDate,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (People) IsNode() {}
|
func (People) IsNode() {}
|
||||||
@@ -1591,6 +1607,7 @@ type ProcessingActivity struct {
|
|||||||
TransferImpactAssessment *TransferImpactAssessment `json:"transferImpactAssessment,omitempty"`
|
TransferImpactAssessment *TransferImpactAssessment `json:"transferImpactAssessment,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ProcessingActivity) IsNode() {}
|
func (ProcessingActivity) IsNode() {}
|
||||||
@@ -1628,6 +1645,7 @@ type Report struct {
|
|||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
Audit *Audit `json:"audit,omitempty"`
|
Audit *Audit `json:"audit,omitempty"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Report) IsNode() {}
|
func (Report) IsNode() {}
|
||||||
@@ -1697,6 +1715,7 @@ type Risk struct {
|
|||||||
Obligations *ObligationConnection `json:"obligations"`
|
Obligations *ObligationConnection `json:"obligations"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Risk) IsNode() {}
|
func (Risk) IsNode() {}
|
||||||
@@ -1759,6 +1778,7 @@ type Snapshot struct {
|
|||||||
Type coredata.SnapshotsType `json:"type"`
|
Type coredata.SnapshotsType `json:"type"`
|
||||||
Controls *ControlConnection `json:"controls"`
|
Controls *ControlConnection `json:"controls"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Snapshot) IsNode() {}
|
func (Snapshot) IsNode() {}
|
||||||
@@ -1822,6 +1842,7 @@ type Task struct {
|
|||||||
Evidences *EvidenceConnection `json:"evidences"`
|
Evidences *EvidenceConnection `json:"evidences"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Task) IsNode() {}
|
func (Task) IsNode() {}
|
||||||
@@ -1843,6 +1864,7 @@ type TransferImpactAssessment struct {
|
|||||||
SupplementaryMeasures *string `json:"supplementaryMeasures,omitempty"`
|
SupplementaryMeasures *string `json:"supplementaryMeasures,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (TransferImpactAssessment) IsNode() {}
|
func (TransferImpactAssessment) IsNode() {}
|
||||||
@@ -1867,6 +1889,7 @@ type TrustCenter struct {
|
|||||||
Organization *Organization `json:"organization"`
|
Organization *Organization `json:"organization"`
|
||||||
Accesses *TrustCenterAccessConnection `json:"accesses"`
|
Accesses *TrustCenterAccessConnection `json:"accesses"`
|
||||||
References *TrustCenterReferenceConnection `json:"references"`
|
References *TrustCenterReferenceConnection `json:"references"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (TrustCenter) IsNode() {}
|
func (TrustCenter) IsNode() {}
|
||||||
@@ -1884,6 +1907,7 @@ type TrustCenterAccess struct {
|
|||||||
PendingRequestCount int `json:"pendingRequestCount"`
|
PendingRequestCount int `json:"pendingRequestCount"`
|
||||||
ActiveCount int `json:"activeCount"`
|
ActiveCount int `json:"activeCount"`
|
||||||
AvailableDocumentAccesses *TrustCenterDocumentAccessConnection `json:"availableDocumentAccesses"`
|
AvailableDocumentAccesses *TrustCenterDocumentAccessConnection `json:"availableDocumentAccesses"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (TrustCenterAccess) IsNode() {}
|
func (TrustCenterAccess) IsNode() {}
|
||||||
@@ -1944,6 +1968,7 @@ type TrustCenterReference struct {
|
|||||||
Rank int `json:"rank"`
|
Rank int `json:"rank"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (TrustCenterReference) IsNode() {}
|
func (TrustCenterReference) IsNode() {}
|
||||||
@@ -2465,6 +2490,7 @@ type Vendor struct {
|
|||||||
ShowOnTrustCenter bool `json:"showOnTrustCenter"`
|
ShowOnTrustCenter bool `json:"showOnTrustCenter"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Vendor) IsNode() {}
|
func (Vendor) IsNode() {}
|
||||||
@@ -2480,6 +2506,7 @@ type VendorBusinessAssociateAgreement struct {
|
|||||||
FileSize int64 `json:"fileSize"`
|
FileSize int64 `json:"fileSize"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (VendorBusinessAssociateAgreement) IsNode() {}
|
func (VendorBusinessAssociateAgreement) IsNode() {}
|
||||||
@@ -2494,6 +2521,7 @@ type VendorComplianceReport struct {
|
|||||||
File *File `json:"file,omitempty"`
|
File *File `json:"file,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (VendorComplianceReport) IsNode() {}
|
func (VendorComplianceReport) IsNode() {}
|
||||||
@@ -2510,14 +2538,15 @@ type VendorComplianceReportEdge struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type VendorContact struct {
|
type VendorContact struct {
|
||||||
ID gid.GID `json:"id"`
|
ID gid.GID `json:"id"`
|
||||||
Vendor *Vendor `json:"vendor"`
|
Vendor *Vendor `json:"vendor"`
|
||||||
FullName *string `json:"fullName,omitempty"`
|
FullName *string `json:"fullName,omitempty"`
|
||||||
Email *mail.Addr `json:"email,omitempty"`
|
Email *mail.Addr `json:"email,omitempty"`
|
||||||
Phone *string `json:"phone,omitempty"`
|
Phone *string `json:"phone,omitempty"`
|
||||||
Role *string `json:"role,omitempty"`
|
Role *string `json:"role,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (VendorContact) IsNode() {}
|
func (VendorContact) IsNode() {}
|
||||||
@@ -2543,6 +2572,7 @@ type VendorDataPrivacyAgreement struct {
|
|||||||
FileSize int64 `json:"fileSize"`
|
FileSize int64 `json:"fileSize"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (VendorDataPrivacyAgreement) IsNode() {}
|
func (VendorDataPrivacyAgreement) IsNode() {}
|
||||||
@@ -2566,6 +2596,7 @@ type VendorRiskAssessment struct {
|
|||||||
Notes *string `json:"notes,omitempty"`
|
Notes *string `json:"notes,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (VendorRiskAssessment) IsNode() {}
|
func (VendorRiskAssessment) IsNode() {}
|
||||||
@@ -2593,6 +2624,7 @@ type VendorService struct {
|
|||||||
Description *string `json:"description,omitempty"`
|
Description *string `json:"description,omitempty"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
Permission bool `json:"permission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (VendorService) IsNode() {}
|
func (VendorService) IsNode() {}
|
||||||
|
|||||||
@@ -94,6 +94,11 @@ func (r *assetResolver) Organization(ctx context.Context, obj *types.Asset) (*ty
|
|||||||
return types.NewOrganization(org), nil
|
return types.NewOrganization(org), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *assetResolver) Permission(ctx context.Context, obj *types.Asset, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *assetConnectionResolver) TotalCount(ctx context.Context, obj *types.AssetConnection) (int, error) {
|
func (r *assetConnectionResolver) TotalCount(ctx context.Context, obj *types.AssetConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionAssetList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionAssetList)
|
||||||
@@ -222,6 +227,11 @@ func (r *auditResolver) Controls(ctx context.Context, obj *types.Audit, first *i
|
|||||||
return types.NewControlConnection(page, r, obj.ID, controlFilter), nil
|
return types.NewControlConnection(page, r, obj.ID, controlFilter), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *auditResolver) Permission(ctx context.Context, obj *types.Audit, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *auditConnectionResolver) TotalCount(ctx context.Context, obj *types.AuditConnection) (int, error) {
|
func (r *auditConnectionResolver) TotalCount(ctx context.Context, obj *types.AuditConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionAuditList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionAuditList)
|
||||||
@@ -273,6 +283,11 @@ func (r *continualImprovementResolver) Owner(ctx context.Context, obj *types.Con
|
|||||||
return types.NewPeople(people), nil
|
return types.NewPeople(people), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *continualImprovementResolver) Permission(ctx context.Context, obj *types.ContinualImprovement, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *continualImprovementConnectionResolver) TotalCount(ctx context.Context, obj *types.ContinualImprovementConnection) (int, error) {
|
func (r *continualImprovementConnectionResolver) TotalCount(ctx context.Context, obj *types.ContinualImprovementConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionContinualImprovementList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionContinualImprovementList)
|
||||||
@@ -500,6 +515,11 @@ func (r *controlResolver) StateOfApplicabilityControls(ctx context.Context, obj
|
|||||||
return types.NewStateOfApplicabilityControlConnection(p, r, obj.ID), nil
|
return types.NewStateOfApplicabilityControlConnection(p, r, obj.ID), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *controlResolver) Permission(ctx context.Context, obj *types.Control, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *controlConnectionResolver) TotalCount(ctx context.Context, obj *types.ControlConnection) (int, error) {
|
func (r *controlConnectionResolver) TotalCount(ctx context.Context, obj *types.ControlConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionControlList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionControlList)
|
||||||
@@ -548,6 +568,11 @@ func (r *controlConnectionResolver) TotalCount(ctx context.Context, obj *types.C
|
|||||||
panic(fmt.Errorf("unsupported resolver: %T", obj.Resolver))
|
panic(fmt.Errorf("unsupported resolver: %T", obj.Resolver))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *customDomainResolver) Permission(ctx context.Context, obj *types.CustomDomain, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// ProcessingActivity is the resolver for the processingActivity field.
|
// ProcessingActivity is the resolver for the processingActivity field.
|
||||||
func (r *dataProtectionImpactAssessmentResolver) ProcessingActivity(ctx context.Context, obj *types.DataProtectionImpactAssessment) (*types.ProcessingActivity, error) {
|
func (r *dataProtectionImpactAssessmentResolver) ProcessingActivity(ctx context.Context, obj *types.DataProtectionImpactAssessment) (*types.ProcessingActivity, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, probo.ActionProcessingActivityList)
|
r.MustAuthorize(ctx, obj.ID, probo.ActionProcessingActivityList)
|
||||||
@@ -589,6 +614,11 @@ func (r *dataProtectionImpactAssessmentResolver) Organization(ctx context.Contex
|
|||||||
return types.NewOrganization(organization), nil
|
return types.NewOrganization(organization), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *dataProtectionImpactAssessmentResolver) Permission(ctx context.Context, obj *types.DataProtectionImpactAssessment, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *dataProtectionImpactAssessmentConnectionResolver) TotalCount(ctx context.Context, obj *types.DataProtectionImpactAssessmentConnection) (int, error) {
|
func (r *dataProtectionImpactAssessmentConnectionResolver) TotalCount(ctx context.Context, obj *types.DataProtectionImpactAssessmentConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionDataProtectionImpactAssessmentList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionDataProtectionImpactAssessmentList)
|
||||||
@@ -798,6 +828,11 @@ func (r *documentResolver) Controls(ctx context.Context, obj *types.Document, fi
|
|||||||
return types.NewControlConnection(page, r, obj.ID, controlFilter), nil
|
return types.NewControlConnection(page, r, obj.ID, controlFilter), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *documentResolver) Permission(ctx context.Context, obj *types.Document, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *documentConnectionResolver) TotalCount(ctx context.Context, obj *types.DocumentConnection) (int, error) {
|
func (r *documentConnectionResolver) TotalCount(ctx context.Context, obj *types.DocumentConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionDocumentList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionDocumentList)
|
||||||
@@ -955,6 +990,11 @@ func (r *documentVersionSignatureResolver) SignedBy(ctx context.Context, obj *ty
|
|||||||
return types.NewPeople(people), nil
|
return types.NewPeople(people), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *documentVersionSignatureResolver) Permission(ctx context.Context, obj *types.DocumentVersionSignature, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// File is the resolver for the file field.
|
// File is the resolver for the file field.
|
||||||
func (r *evidenceResolver) File(ctx context.Context, obj *types.Evidence) (*types.File, error) {
|
func (r *evidenceResolver) File(ctx context.Context, obj *types.Evidence) (*types.File, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, probo.ActionFileGet)
|
r.MustAuthorize(ctx, obj.ID, probo.ActionFileGet)
|
||||||
@@ -1019,6 +1059,11 @@ func (r *evidenceResolver) Measure(ctx context.Context, obj *types.Evidence) (*t
|
|||||||
return types.NewMeasure(measure), nil
|
return types.NewMeasure(measure), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *evidenceResolver) Permission(ctx context.Context, obj *types.Evidence, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *evidenceConnectionResolver) TotalCount(ctx context.Context, obj *types.EvidenceConnection) (int, error) {
|
func (r *evidenceConnectionResolver) TotalCount(ctx context.Context, obj *types.EvidenceConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionEvidenceList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionEvidenceList)
|
||||||
@@ -1132,6 +1177,11 @@ func (r *frameworkResolver) DarkLogoURL(ctx context.Context, obj *types.Framewor
|
|||||||
return prb.Frameworks.GenerateDarkLogoURL(ctx, obj.ID, 1*time.Hour)
|
return prb.Frameworks.GenerateDarkLogoURL(ctx, obj.ID, 1*time.Hour)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *frameworkResolver) Permission(ctx context.Context, obj *types.Framework, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *frameworkConnectionResolver) TotalCount(ctx context.Context, obj *types.FrameworkConnection) (int, error) {
|
func (r *frameworkConnectionResolver) TotalCount(ctx context.Context, obj *types.FrameworkConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionFrameworkList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionFrameworkList)
|
||||||
@@ -1274,6 +1324,11 @@ func (r *measureResolver) Controls(ctx context.Context, obj *types.Measure, firs
|
|||||||
return types.NewControlConnection(page, r, obj.ID, controlFilter), nil
|
return types.NewControlConnection(page, r, obj.ID, controlFilter), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *measureResolver) Permission(ctx context.Context, obj *types.Measure, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *measureConnectionResolver) TotalCount(ctx context.Context, obj *types.MeasureConnection) (int, error) {
|
func (r *measureConnectionResolver) TotalCount(ctx context.Context, obj *types.MeasureConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionMeasureList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionMeasureList)
|
||||||
@@ -1353,6 +1408,11 @@ func (r *meetingResolver) Organization(ctx context.Context, obj *types.Meeting)
|
|||||||
return types.NewOrganization(organization), nil
|
return types.NewOrganization(organization), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *meetingResolver) Permission(ctx context.Context, obj *types.Meeting, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *meetingConnectionResolver) TotalCount(ctx context.Context, obj *types.MeetingConnection) (int, error) {
|
func (r *meetingConnectionResolver) TotalCount(ctx context.Context, obj *types.MeetingConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionMeetingList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionMeetingList)
|
||||||
@@ -4748,6 +4808,11 @@ func (r *nonconformityResolver) Owner(ctx context.Context, obj *types.Nonconform
|
|||||||
return types.NewPeople(people), nil
|
return types.NewPeople(people), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *nonconformityResolver) Permission(ctx context.Context, obj *types.Nonconformity, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *nonconformityConnectionResolver) TotalCount(ctx context.Context, obj *types.NonconformityConnection) (int, error) {
|
func (r *nonconformityConnectionResolver) TotalCount(ctx context.Context, obj *types.NonconformityConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionNonconformityList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionNonconformityList)
|
||||||
@@ -4810,6 +4875,11 @@ func (r *obligationResolver) Owner(ctx context.Context, obj *types.Obligation) (
|
|||||||
return types.NewPeople(people), nil
|
return types.NewPeople(people), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *obligationResolver) Permission(ctx context.Context, obj *types.Obligation, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *obligationConnectionResolver) TotalCount(ctx context.Context, obj *types.ObligationConnection) (int, error) {
|
func (r *obligationConnectionResolver) TotalCount(ctx context.Context, obj *types.ObligationConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionObligationList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionObligationList)
|
||||||
@@ -5645,6 +5715,16 @@ func (r *organizationResolver) CustomDomain(ctx context.Context, obj *types.Orga
|
|||||||
return types.NewCustomDomain(domain, r.customDomainCname), nil
|
return types.NewCustomDomain(domain, r.customDomainCname), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *organizationResolver) Permission(ctx context.Context, obj *types.Organization, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *peopleResolver) Permission(ctx context.Context, obj *types.People, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *peopleConnectionResolver) TotalCount(ctx context.Context, obj *types.PeopleConnection) (int, error) {
|
func (r *peopleConnectionResolver) TotalCount(ctx context.Context, obj *types.PeopleConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionPeopleList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionPeopleList)
|
||||||
@@ -5772,6 +5852,11 @@ func (r *processingActivityResolver) TransferImpactAssessment(ctx context.Contex
|
|||||||
return types.NewTransferImpactAssessment(tia), nil
|
return types.NewTransferImpactAssessment(tia), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *processingActivityResolver) Permission(ctx context.Context, obj *types.ProcessingActivity, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *processingActivityConnectionResolver) TotalCount(ctx context.Context, obj *types.ProcessingActivityConnection) (int, error) {
|
func (r *processingActivityConnectionResolver) TotalCount(ctx context.Context, obj *types.ProcessingActivityConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionProcessingActivityList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionProcessingActivityList)
|
||||||
@@ -6153,6 +6238,11 @@ func (r *reportResolver) Audit(ctx context.Context, obj *types.Report) (*types.A
|
|||||||
return types.NewAudit(audit), nil
|
return types.NewAudit(audit), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *reportResolver) Permission(ctx context.Context, obj *types.Report, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// Organization is the resolver for the organization field.
|
// Organization is the resolver for the organization field.
|
||||||
func (r *rightsRequestResolver) Organization(ctx context.Context, obj *types.RightsRequest) (*types.Organization, error) {
|
func (r *rightsRequestResolver) Organization(ctx context.Context, obj *types.RightsRequest) (*types.Organization, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, iam.ActionGetOrganization)
|
r.MustAuthorize(ctx, obj.ID, iam.ActionGetOrganization)
|
||||||
@@ -6367,6 +6457,11 @@ func (r *riskResolver) Obligations(ctx context.Context, obj *types.Risk, first *
|
|||||||
return types.NewObligationConnection(page, r, obj.ID, filter), nil
|
return types.NewObligationConnection(page, r, obj.ID, filter), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *riskResolver) Permission(ctx context.Context, obj *types.Risk, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *riskConnectionResolver) TotalCount(ctx context.Context, obj *types.RiskConnection) (int, error) {
|
func (r *riskConnectionResolver) TotalCount(ctx context.Context, obj *types.RiskConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionRiskList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionRiskList)
|
||||||
@@ -6496,6 +6591,11 @@ func (r *snapshotResolver) Controls(ctx context.Context, obj *types.Snapshot, fi
|
|||||||
return types.NewControlConnection(page, r, obj.ID, controlFilter), nil
|
return types.NewControlConnection(page, r, obj.ID, controlFilter), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *snapshotResolver) Permission(ctx context.Context, obj *types.Snapshot, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *snapshotConnectionResolver) TotalCount(ctx context.Context, obj *types.SnapshotConnection) (int, error) {
|
func (r *snapshotConnectionResolver) TotalCount(ctx context.Context, obj *types.SnapshotConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionSnapshotList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionSnapshotList)
|
||||||
@@ -6731,6 +6831,11 @@ func (r *taskResolver) Evidences(ctx context.Context, obj *types.Task, first *in
|
|||||||
return types.NewEvidenceConnection(page, r, obj.ID), nil
|
return types.NewEvidenceConnection(page, r, obj.ID), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *taskResolver) Permission(ctx context.Context, obj *types.Task, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *taskConnectionResolver) TotalCount(ctx context.Context, obj *types.TaskConnection) (int, error) {
|
func (r *taskConnectionResolver) TotalCount(ctx context.Context, obj *types.TaskConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionTaskList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionTaskList)
|
||||||
@@ -6787,6 +6892,11 @@ func (r *transferImpactAssessmentResolver) Organization(ctx context.Context, obj
|
|||||||
return types.NewOrganization(organization), nil
|
return types.NewOrganization(organization), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *transferImpactAssessmentResolver) Permission(ctx context.Context, obj *types.TransferImpactAssessment, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *transferImpactAssessmentConnectionResolver) TotalCount(ctx context.Context, obj *types.TransferImpactAssessmentConnection) (int, error) {
|
func (r *transferImpactAssessmentConnectionResolver) TotalCount(ctx context.Context, obj *types.TransferImpactAssessmentConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionTransferImpactAssessmentList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionTransferImpactAssessmentList)
|
||||||
@@ -6896,6 +7006,11 @@ func (r *trustCenterResolver) References(ctx context.Context, obj *types.TrustCe
|
|||||||
return types.NewTrustCenterReferenceConnection(result, obj.ID), nil
|
return types.NewTrustCenterReferenceConnection(result, obj.ID), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *trustCenterResolver) Permission(ctx context.Context, obj *types.TrustCenter, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// PendingRequestCount is the resolver for the pendingRequestCount field.
|
// PendingRequestCount is the resolver for the pendingRequestCount field.
|
||||||
func (r *trustCenterAccessResolver) PendingRequestCount(ctx context.Context, obj *types.TrustCenterAccess) (int, error) {
|
func (r *trustCenterAccessResolver) PendingRequestCount(ctx context.Context, obj *types.TrustCenterAccess) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, probo.ActionTrustCenterAccessGet)
|
r.MustAuthorize(ctx, obj.ID, probo.ActionTrustCenterAccessGet)
|
||||||
@@ -6950,6 +7065,11 @@ func (r *trustCenterAccessResolver) AvailableDocumentAccesses(ctx context.Contex
|
|||||||
return types.NewTrustCenterDocumentAccessConnection(result, obj, obj.ID), nil
|
return types.NewTrustCenterDocumentAccessConnection(result, obj, obj.ID), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *trustCenterAccessResolver) Permission(ctx context.Context, obj *types.TrustCenterAccess, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// Document is the resolver for the document field.
|
// Document is the resolver for the document field.
|
||||||
func (r *trustCenterDocumentAccessResolver) Document(ctx context.Context, obj *types.TrustCenterDocumentAccess) (*types.Document, error) {
|
func (r *trustCenterDocumentAccessResolver) Document(ctx context.Context, obj *types.TrustCenterDocumentAccess) (*types.Document, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, probo.ActionDocumentGet)
|
r.MustAuthorize(ctx, obj.ID, probo.ActionDocumentGet)
|
||||||
@@ -7086,6 +7206,11 @@ func (r *trustCenterReferenceResolver) LogoURL(ctx context.Context, obj *types.T
|
|||||||
return fileURL, nil
|
return fileURL, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *trustCenterReferenceResolver) Permission(ctx context.Context, obj *types.TrustCenterReference, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *trustCenterReferenceConnectionResolver) TotalCount(ctx context.Context, obj *types.TrustCenterReferenceConnection) (int, error) {
|
func (r *trustCenterReferenceConnectionResolver) TotalCount(ctx context.Context, obj *types.TrustCenterReferenceConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionTrustCenterReferenceList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionTrustCenterReferenceList)
|
||||||
@@ -7324,6 +7449,11 @@ func (r *vendorResolver) SecurityOwner(ctx context.Context, obj *types.Vendor) (
|
|||||||
return types.NewPeople(people), nil
|
return types.NewPeople(people), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *vendorResolver) Permission(ctx context.Context, obj *types.Vendor, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// Vendor is the resolver for the vendor field.
|
// Vendor is the resolver for the vendor field.
|
||||||
func (r *vendorBusinessAssociateAgreementResolver) Vendor(ctx context.Context, obj *types.VendorBusinessAssociateAgreement) (*types.Vendor, error) {
|
func (r *vendorBusinessAssociateAgreementResolver) Vendor(ctx context.Context, obj *types.VendorBusinessAssociateAgreement) (*types.Vendor, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
||||||
@@ -7356,6 +7486,11 @@ func (r *vendorBusinessAssociateAgreementResolver) FileURL(ctx context.Context,
|
|||||||
return fileURL, nil
|
return fileURL, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *vendorBusinessAssociateAgreementResolver) Permission(ctx context.Context, obj *types.VendorBusinessAssociateAgreement, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// Vendor is the resolver for the vendor field.
|
// Vendor is the resolver for the vendor field.
|
||||||
func (r *vendorComplianceReportResolver) Vendor(ctx context.Context, obj *types.VendorComplianceReport) (*types.Vendor, error) {
|
func (r *vendorComplianceReportResolver) Vendor(ctx context.Context, obj *types.VendorComplianceReport) (*types.Vendor, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
||||||
@@ -7401,6 +7536,11 @@ func (r *vendorComplianceReportResolver) File(ctx context.Context, obj *types.Ve
|
|||||||
return types.NewFile(file), nil
|
return types.NewFile(file), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *vendorComplianceReportResolver) Permission(ctx context.Context, obj *types.VendorComplianceReport, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// TotalCount is the resolver for the totalCount field.
|
// TotalCount is the resolver for the totalCount field.
|
||||||
func (r *vendorConnectionResolver) TotalCount(ctx context.Context, obj *types.VendorConnection) (int, error) {
|
func (r *vendorConnectionResolver) TotalCount(ctx context.Context, obj *types.VendorConnection) (int, error) {
|
||||||
r.MustAuthorize(ctx, obj.ParentID, probo.ActionVendorList)
|
r.MustAuthorize(ctx, obj.ParentID, probo.ActionVendorList)
|
||||||
@@ -7455,6 +7595,11 @@ func (r *vendorContactResolver) Vendor(ctx context.Context, obj *types.VendorCon
|
|||||||
return types.NewVendor(vendor), nil
|
return types.NewVendor(vendor), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *vendorContactResolver) Permission(ctx context.Context, obj *types.VendorContact, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// Vendor is the resolver for the vendor field.
|
// Vendor is the resolver for the vendor field.
|
||||||
func (r *vendorDataPrivacyAgreementResolver) Vendor(ctx context.Context, obj *types.VendorDataPrivacyAgreement) (*types.Vendor, error) {
|
func (r *vendorDataPrivacyAgreementResolver) Vendor(ctx context.Context, obj *types.VendorDataPrivacyAgreement) (*types.Vendor, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
||||||
@@ -7487,6 +7632,11 @@ func (r *vendorDataPrivacyAgreementResolver) FileURL(ctx context.Context, obj *t
|
|||||||
return fileURL, nil
|
return fileURL, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *vendorDataPrivacyAgreementResolver) Permission(ctx context.Context, obj *types.VendorDataPrivacyAgreement, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// Vendor is the resolver for the vendor field.
|
// Vendor is the resolver for the vendor field.
|
||||||
func (r *vendorRiskAssessmentResolver) Vendor(ctx context.Context, obj *types.VendorRiskAssessment) (*types.Vendor, error) {
|
func (r *vendorRiskAssessmentResolver) Vendor(ctx context.Context, obj *types.VendorRiskAssessment) (*types.Vendor, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
||||||
@@ -7505,6 +7655,11 @@ func (r *vendorRiskAssessmentResolver) Vendor(ctx context.Context, obj *types.Ve
|
|||||||
return types.NewVendor(vendor), nil
|
return types.NewVendor(vendor), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *vendorRiskAssessmentResolver) Permission(ctx context.Context, obj *types.VendorRiskAssessment, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// Vendor is the resolver for the vendor field.
|
// Vendor is the resolver for the vendor field.
|
||||||
func (r *vendorServiceResolver) Vendor(ctx context.Context, obj *types.VendorService) (*types.Vendor, error) {
|
func (r *vendorServiceResolver) Vendor(ctx context.Context, obj *types.VendorService) (*types.Vendor, error) {
|
||||||
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
r.MustAuthorize(ctx, obj.ID, probo.ActionVendorGet)
|
||||||
@@ -7523,6 +7678,11 @@ func (r *vendorServiceResolver) Vendor(ctx context.Context, obj *types.VendorSer
|
|||||||
return types.NewVendor(vendor), nil
|
return types.NewVendor(vendor), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permission is the resolver for the permission field.
|
||||||
|
func (r *vendorServiceResolver) Permission(ctx context.Context, obj *types.VendorService, action string) (bool, error) {
|
||||||
|
return r.Resolver.Permission(ctx, obj, action)
|
||||||
|
}
|
||||||
|
|
||||||
// SignableDocuments is the resolver for the signableDocuments field.
|
// SignableDocuments is the resolver for the signableDocuments field.
|
||||||
func (r *viewerResolver) SignableDocuments(ctx context.Context, obj *types.Viewer, organizationID gid.GID, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.DocumentOrderBy) (*types.SignableDocumentConnection, error) {
|
func (r *viewerResolver) SignableDocuments(ctx context.Context, obj *types.Viewer, organizationID gid.GID, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.DocumentOrderBy) (*types.SignableDocumentConnection, error) {
|
||||||
r.MustAuthorize(ctx, organizationID, probo.ActionDocumentList)
|
r.MustAuthorize(ctx, organizationID, probo.ActionDocumentList)
|
||||||
@@ -7630,6 +7790,9 @@ func (r *Resolver) ControlConnection() schema.ControlConnectionResolver {
|
|||||||
return &controlConnectionResolver{r}
|
return &controlConnectionResolver{r}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CustomDomain returns schema.CustomDomainResolver implementation.
|
||||||
|
func (r *Resolver) CustomDomain() schema.CustomDomainResolver { return &customDomainResolver{r} }
|
||||||
|
|
||||||
// DataProtectionImpactAssessment returns schema.DataProtectionImpactAssessmentResolver implementation.
|
// DataProtectionImpactAssessment returns schema.DataProtectionImpactAssessmentResolver implementation.
|
||||||
func (r *Resolver) DataProtectionImpactAssessment() schema.DataProtectionImpactAssessmentResolver {
|
func (r *Resolver) DataProtectionImpactAssessment() schema.DataProtectionImpactAssessmentResolver {
|
||||||
return &dataProtectionImpactAssessmentResolver{r}
|
return &dataProtectionImpactAssessmentResolver{r}
|
||||||
@@ -7723,6 +7886,9 @@ func (r *Resolver) ObligationConnection() schema.ObligationConnectionResolver {
|
|||||||
// Organization returns schema.OrganizationResolver implementation.
|
// Organization returns schema.OrganizationResolver implementation.
|
||||||
func (r *Resolver) Organization() schema.OrganizationResolver { return &organizationResolver{r} }
|
func (r *Resolver) Organization() schema.OrganizationResolver { return &organizationResolver{r} }
|
||||||
|
|
||||||
|
// People returns schema.PeopleResolver implementation.
|
||||||
|
func (r *Resolver) People() schema.PeopleResolver { return &peopleResolver{r} }
|
||||||
|
|
||||||
// PeopleConnection returns schema.PeopleConnectionResolver implementation.
|
// PeopleConnection returns schema.PeopleConnectionResolver implementation.
|
||||||
func (r *Resolver) PeopleConnection() schema.PeopleConnectionResolver {
|
func (r *Resolver) PeopleConnection() schema.PeopleConnectionResolver {
|
||||||
return &peopleConnectionResolver{r}
|
return &peopleConnectionResolver{r}
|
||||||
@@ -7885,6 +8051,7 @@ type continualImprovementResolver struct{ *Resolver }
|
|||||||
type continualImprovementConnectionResolver struct{ *Resolver }
|
type continualImprovementConnectionResolver struct{ *Resolver }
|
||||||
type controlResolver struct{ *Resolver }
|
type controlResolver struct{ *Resolver }
|
||||||
type controlConnectionResolver struct{ *Resolver }
|
type controlConnectionResolver struct{ *Resolver }
|
||||||
|
type customDomainResolver struct{ *Resolver }
|
||||||
type dataProtectionImpactAssessmentResolver struct{ *Resolver }
|
type dataProtectionImpactAssessmentResolver struct{ *Resolver }
|
||||||
type dataProtectionImpactAssessmentConnectionResolver struct{ *Resolver }
|
type dataProtectionImpactAssessmentConnectionResolver struct{ *Resolver }
|
||||||
type datumResolver struct{ *Resolver }
|
type datumResolver struct{ *Resolver }
|
||||||
@@ -7908,6 +8075,7 @@ type nonconformityConnectionResolver struct{ *Resolver }
|
|||||||
type obligationResolver struct{ *Resolver }
|
type obligationResolver struct{ *Resolver }
|
||||||
type obligationConnectionResolver struct{ *Resolver }
|
type obligationConnectionResolver struct{ *Resolver }
|
||||||
type organizationResolver struct{ *Resolver }
|
type organizationResolver struct{ *Resolver }
|
||||||
|
type peopleResolver struct{ *Resolver }
|
||||||
type peopleConnectionResolver struct{ *Resolver }
|
type peopleConnectionResolver struct{ *Resolver }
|
||||||
type processingActivityResolver struct{ *Resolver }
|
type processingActivityResolver struct{ *Resolver }
|
||||||
type processingActivityConnectionResolver struct{ *Resolver }
|
type processingActivityConnectionResolver struct{ *Resolver }
|
||||||
|
|||||||
Reference in New Issue
Block a user