From 9941a6a66aefee7b3cc3995e81b68074e982b105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Wed, 18 Feb 2026 17:14:43 +0400 Subject: [PATCH] Disable activation on scim profiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Émile Ré --- ...PeopleListFragment_RefetchQuery.graphql.ts | 46 ++--- .../iam/PeopleListItemFragment.graphql.ts | 53 ++---- .../iam/PeoplePageQuery.graphql.ts | 46 ++--- .../iam/PersonFormFragment.graphql.ts | 12 +- .../iam/PersonForm_createMutation.graphql.ts | 46 ++--- .../iam/PersonPageQuery.graphql.ts | 62 ++----- .../iam/organizations/people/PersonPage.tsx | 15 +- .../people/_components/PeopleListItem.tsx | 158 +++++++++--------- .../people/_components/PersonForm.tsx | 3 +- pkg/iam/auth_service.go | 4 + pkg/iam/organization_service.go | 4 + pkg/server/api/connect/v1/types/profile.go | 1 + 12 files changed, 163 insertions(+), 287 deletions(-) diff --git a/apps/console/src/__generated__/iam/PeopleListFragment_RefetchQuery.graphql.ts b/apps/console/src/__generated__/iam/PeopleListFragment_RefetchQuery.graphql.ts index 2c37477d8..e2cee00c0 100644 --- a/apps/console/src/__generated__/iam/PeopleListFragment_RefetchQuery.graphql.ts +++ b/apps/console/src/__generated__/iam/PeopleListFragment_RefetchQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -301,6 +301,13 @@ return { "name": "fullName", "storageKey": null }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "emailAddress", + "storageKey": null + }, { "alias": null, "args": null, @@ -333,25 +340,6 @@ return { ], "storageKey": null }, - { - "alias": null, - "args": null, - "concreteType": "Identity", - "kind": "LinkedField", - "name": "identity", - "plural": false, - "selections": [ - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "email", - "storageKey": null - }, - (v12/*: any*/) - ], - "storageKey": null - }, { "alias": "lastInvitation", "args": (v14/*: any*/), @@ -377,20 +365,6 @@ return { "plural": false, "selections": [ (v12/*: any*/), - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "expiresAt", - "storageKey": null - }, - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "acceptedAt", - "storageKey": null - }, (v15/*: any*/), (v11/*: any*/) ], @@ -524,12 +498,12 @@ return { ] }, "params": { - "cacheID": "f25ca8641478e79fb2ccf6fa825fe042", + "cacheID": "15a5dd79df1b16aa1a66ccb8024f9627", "id": null, "metadata": {}, "name": "PeopleListFragment_RefetchQuery", "operationKind": "query", - "text": "query PeopleListFragment_RefetchQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 20\n $last: Int = null\n $order: ProfileOrder = {direction: ASC, field: FULL_NAME}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...PeopleListFragment_16fISc\n id\n }\n}\n\nfragment PeopleListFragment_16fISc on Organization {\n profiles(first: $first, after: $after, last: $last, before: $before, orderBy: $order) {\n totalCount\n edges {\n node {\n id\n ...PeopleListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment PeopleListItemFragment on Profile {\n id\n source\n state\n fullName\n membership {\n id\n role\n canUpdate: permission(action: \"iam:membership:update\")\n }\n identity {\n email\n id\n }\n lastInvitation: pendingInvitations(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n expiresAt\n acceptedAt\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n createdAt\n canUpdate: permission(action: \"iam:membership-profile:update\")\n canInvite: permission(action: \"iam:invitation:create\")\n canDelete: permission(action: \"iam:membership-profile:delete\")\n}\n" + "text": "query PeopleListFragment_RefetchQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 20\n $last: Int = null\n $order: ProfileOrder = {direction: ASC, field: FULL_NAME}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...PeopleListFragment_16fISc\n id\n }\n}\n\nfragment PeopleListFragment_16fISc on Organization {\n profiles(first: $first, after: $after, last: $last, before: $before, orderBy: $order) {\n totalCount\n edges {\n node {\n id\n ...PeopleListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment PeopleListItemFragment on Profile {\n id\n source\n state\n fullName\n emailAddress\n membership {\n id\n role\n canUpdate: permission(action: \"iam:membership:update\")\n }\n lastInvitation: pendingInvitations(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n createdAt\n canUpdate: permission(action: \"iam:membership-profile:update\")\n canInvite: permission(action: \"iam:invitation:create\")\n canDelete: permission(action: \"iam:membership-profile:delete\")\n}\n" } }; })(); diff --git a/apps/console/src/__generated__/iam/PeopleListItemFragment.graphql.ts b/apps/console/src/__generated__/iam/PeopleListItemFragment.graphql.ts index 7492030e9..feea8604e 100644 --- a/apps/console/src/__generated__/iam/PeopleListItemFragment.graphql.ts +++ b/apps/console/src/__generated__/iam/PeopleListItemFragment.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<91bec60a40a9170868272814635ea3fa>> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -17,18 +17,14 @@ export type PeopleListItemFragment$data = { readonly canInvite: boolean; readonly canUpdate: boolean; readonly createdAt: string; + readonly emailAddress: string; readonly fullName: string; readonly id: string; - readonly identity: { - readonly email: string; - }; readonly lastInvitation: { readonly __id: string; readonly edges: ReadonlyArray<{ readonly node: { - readonly acceptedAt: string | null | undefined; readonly createdAt: string; - readonly expiresAt: string; readonly id: string; }; }>; @@ -101,6 +97,13 @@ return { "name": "fullName", "storageKey": null }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "emailAddress", + "storageKey": null + }, { "kind": "RequiredField", "field": { @@ -137,28 +140,6 @@ return { }, "action": "THROW" }, - { - "kind": "RequiredField", - "field": { - "alias": null, - "args": null, - "concreteType": "Identity", - "kind": "LinkedField", - "name": "identity", - "plural": false, - "selections": [ - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "email", - "storageKey": null - } - ], - "storageKey": null - }, - "action": "THROW" - }, { "kind": "RequiredField", "field": { @@ -195,20 +176,6 @@ return { "plural": false, "selections": [ (v0/*: any*/), - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "expiresAt", - "storageKey": null - }, - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "acceptedAt", - "storageKey": null - }, (v1/*: any*/), { "alias": null, @@ -318,6 +285,6 @@ return { }; })(); -(node as any).hash = "b276a06948260a9d89947b386c6392d1"; +(node as any).hash = "f10aa3067eeb7fc95eb7c7a893e7dd6e"; export default node; diff --git a/apps/console/src/__generated__/iam/PeoplePageQuery.graphql.ts b/apps/console/src/__generated__/iam/PeoplePageQuery.graphql.ts index 99a650522..02360a4f7 100644 --- a/apps/console/src/__generated__/iam/PeoplePageQuery.graphql.ts +++ b/apps/console/src/__generated__/iam/PeoplePageQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<<86b86e1209fbe58b62c2be028fb0482c>> * @lightSyntaxTransform * @nogrep */ @@ -266,6 +266,13 @@ return { "name": "fullName", "storageKey": null }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "emailAddress", + "storageKey": null + }, { "alias": null, "args": null, @@ -298,25 +305,6 @@ return { ], "storageKey": null }, - { - "alias": null, - "args": null, - "concreteType": "Identity", - "kind": "LinkedField", - "name": "identity", - "plural": false, - "selections": [ - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "email", - "storageKey": null - }, - (v6/*: any*/) - ], - "storageKey": null - }, { "alias": "lastInvitation", "args": (v8/*: any*/), @@ -342,20 +330,6 @@ return { "plural": false, "selections": [ (v6/*: any*/), - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "expiresAt", - "storageKey": null - }, - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "acceptedAt", - "storageKey": null - }, (v9/*: any*/), (v2/*: any*/) ], @@ -489,12 +463,12 @@ return { ] }, "params": { - "cacheID": "a5d551184b2abe39feea3dfb05bfe21d", + "cacheID": "af366ea24d2c96763b104acc69d9b3ff", "id": null, "metadata": {}, "name": "PeoplePageQuery", "operationKind": "query", - "text": "query PeoplePageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n canCreateUser: permission(action: \"iam:membership-profile:create\")\n ...PeopleListFragment_8lnpd\n }\n id\n }\n}\n\nfragment PeopleListFragment_8lnpd on Organization {\n profiles(first: 20, orderBy: {direction: ASC, field: FULL_NAME}) {\n totalCount\n edges {\n node {\n id\n ...PeopleListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment PeopleListItemFragment on Profile {\n id\n source\n state\n fullName\n membership {\n id\n role\n canUpdate: permission(action: \"iam:membership:update\")\n }\n identity {\n email\n id\n }\n lastInvitation: pendingInvitations(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n expiresAt\n acceptedAt\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n createdAt\n canUpdate: permission(action: \"iam:membership-profile:update\")\n canInvite: permission(action: \"iam:invitation:create\")\n canDelete: permission(action: \"iam:membership-profile:delete\")\n}\n" + "text": "query PeoplePageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n canCreateUser: permission(action: \"iam:membership-profile:create\")\n ...PeopleListFragment_8lnpd\n }\n id\n }\n}\n\nfragment PeopleListFragment_8lnpd on Organization {\n profiles(first: 20, orderBy: {direction: ASC, field: FULL_NAME}) {\n totalCount\n edges {\n node {\n id\n ...PeopleListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment PeopleListItemFragment on Profile {\n id\n source\n state\n fullName\n emailAddress\n membership {\n id\n role\n canUpdate: permission(action: \"iam:membership:update\")\n }\n lastInvitation: pendingInvitations(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n createdAt\n canUpdate: permission(action: \"iam:membership-profile:update\")\n canInvite: permission(action: \"iam:invitation:create\")\n canDelete: permission(action: \"iam:membership-profile:delete\")\n}\n" } }; })(); diff --git a/apps/console/src/__generated__/iam/PersonFormFragment.graphql.ts b/apps/console/src/__generated__/iam/PersonFormFragment.graphql.ts index ee5260ddb..d74dd66b0 100644 --- a/apps/console/src/__generated__/iam/PersonFormFragment.graphql.ts +++ b/apps/console/src/__generated__/iam/PersonFormFragment.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<<1eea90ca68f7381b881c68f0489837cb>> * @lightSyntaxTransform * @nogrep */ @@ -25,6 +25,7 @@ export type PersonFormFragment$data = { readonly role: MembershipRole; }; readonly position: string | null | undefined; + readonly source: string; readonly " $fragmentType": "PersonFormFragment"; }; export type PersonFormFragment$key = { @@ -59,6 +60,13 @@ const node: ReaderFragment = { "name": "emailAddress", "storageKey": null }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "source", + "storageKey": null + }, { "kind": "RequiredField", "field": { @@ -134,6 +142,6 @@ const node: ReaderFragment = { "abstractKey": null }; -(node as any).hash = "4f99d9b9ed708290c5a7d7ec258a0b1d"; +(node as any).hash = "37e8a56333b217e5b6d3b94b455d7d40"; export default node; diff --git a/apps/console/src/__generated__/iam/PersonForm_createMutation.graphql.ts b/apps/console/src/__generated__/iam/PersonForm_createMutation.graphql.ts index 360409669..02b9f45c3 100644 --- a/apps/console/src/__generated__/iam/PersonForm_createMutation.graphql.ts +++ b/apps/console/src/__generated__/iam/PersonForm_createMutation.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<85bf3907699ac605e0603c8d1ae6ef8b>> + * @generated SignedSource<<7889e38e185230a2c5b41c3b0fb73cca>> * @lightSyntaxTransform * @nogrep */ @@ -195,6 +195,13 @@ return { "name": "fullName", "storageKey": null }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "emailAddress", + "storageKey": null + }, { "alias": null, "args": null, @@ -227,25 +234,6 @@ return { ], "storageKey": null }, - { - "alias": null, - "args": null, - "concreteType": "Identity", - "kind": "LinkedField", - "name": "identity", - "plural": false, - "selections": [ - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "email", - "storageKey": null - }, - (v3/*: any*/) - ], - "storageKey": null - }, { "alias": "lastInvitation", "args": (v4/*: any*/), @@ -271,20 +259,6 @@ return { "plural": false, "selections": [ (v3/*: any*/), - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "expiresAt", - "storageKey": null - }, - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "acceptedAt", - "storageKey": null - }, (v5/*: any*/), { "alias": null, @@ -425,12 +399,12 @@ return { ] }, "params": { - "cacheID": "afbd8ffc5b5ae7156a108a2d1b25440b", + "cacheID": "738254d707f8ed725c30ee87baa585fb", "id": null, "metadata": {}, "name": "PersonForm_createMutation", "operationKind": "mutation", - "text": "mutation PersonForm_createMutation(\n $input: CreateUserInput!\n) {\n createUser(input: $input) {\n profileEdge {\n node {\n ...PeopleListItemFragment\n id\n }\n }\n }\n}\n\nfragment PeopleListItemFragment on Profile {\n id\n source\n state\n fullName\n membership {\n id\n role\n canUpdate: permission(action: \"iam:membership:update\")\n }\n identity {\n email\n id\n }\n lastInvitation: pendingInvitations(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n expiresAt\n acceptedAt\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n createdAt\n canUpdate: permission(action: \"iam:membership-profile:update\")\n canInvite: permission(action: \"iam:invitation:create\")\n canDelete: permission(action: \"iam:membership-profile:delete\")\n}\n" + "text": "mutation PersonForm_createMutation(\n $input: CreateUserInput!\n) {\n createUser(input: $input) {\n profileEdge {\n node {\n ...PeopleListItemFragment\n id\n }\n }\n }\n}\n\nfragment PeopleListItemFragment on Profile {\n id\n source\n state\n fullName\n emailAddress\n membership {\n id\n role\n canUpdate: permission(action: \"iam:membership:update\")\n }\n lastInvitation: pendingInvitations(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n createdAt\n canUpdate: permission(action: \"iam:membership-profile:update\")\n canInvite: permission(action: \"iam:invitation:create\")\n canDelete: permission(action: \"iam:membership-profile:delete\")\n}\n" } }; })(); diff --git a/apps/console/src/__generated__/iam/PersonPageQuery.graphql.ts b/apps/console/src/__generated__/iam/PersonPageQuery.graphql.ts index 592bfbc4e..3817df03a 100644 --- a/apps/console/src/__generated__/iam/PersonPageQuery.graphql.ts +++ b/apps/console/src/__generated__/iam/PersonPageQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<679cd9698980b9fdf8b330df8df3aac5>> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -17,11 +17,10 @@ export type PersonPageQuery$data = { readonly person: { readonly __typename: "Profile"; readonly canDelete: boolean; + readonly emailAddress: string; readonly fullName: string; readonly id: string; - readonly identity: { - readonly email: string; - }; + readonly source: string; readonly " $fragmentSpreads": FragmentRefs<"PersonFormFragment">; } | { // This will never be '%other', but we need some @@ -74,10 +73,17 @@ v5 = { "alias": null, "args": null, "kind": "ScalarField", - "name": "email", + "name": "emailAddress", "storageKey": null }, v6 = { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "source", + "storageKey": null +}, +v7 = { "alias": "canDelete", "args": [ { @@ -113,23 +119,9 @@ return { "selections": [ (v3/*: any*/), (v4/*: any*/), - { - "kind": "RequiredField", - "field": { - "alias": null, - "args": null, - "concreteType": "Identity", - "kind": "LinkedField", - "name": "identity", - "plural": false, - "selections": [ - (v5/*: any*/) - ], - "storageKey": null - }, - "action": "THROW" - }, + (v5/*: any*/), (v6/*: any*/), + (v7/*: any*/), { "args": null, "kind": "FragmentSpread", @@ -168,27 +160,9 @@ return { "kind": "InlineFragment", "selections": [ (v4/*: any*/), - { - "alias": null, - "args": null, - "concreteType": "Identity", - "kind": "LinkedField", - "name": "identity", - "plural": false, - "selections": [ - (v5/*: any*/), - (v3/*: any*/) - ], - "storageKey": null - }, + (v5/*: any*/), (v6/*: any*/), - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "emailAddress", - "storageKey": null - }, + (v7/*: any*/), { "alias": null, "args": null, @@ -266,16 +240,16 @@ return { ] }, "params": { - "cacheID": "cb1cec2fd7c66b42f61d40e6a22b0d67", + "cacheID": "f78728c7deb19de68b5b996c58ebd05e", "id": null, "metadata": {}, "name": "PersonPageQuery", "operationKind": "query", - "text": "query PersonPageQuery(\n $personId: ID!\n) {\n person: node(id: $personId) {\n __typename\n ... on Profile {\n id\n fullName\n identity {\n email\n id\n }\n canDelete: permission(action: \"iam:membership-profile:delete\")\n ...PersonFormFragment\n }\n id\n }\n}\n\nfragment PersonFormFragment on Profile {\n id\n fullName\n emailAddress\n membership {\n role\n id\n }\n kind\n position\n additionalEmailAddresses\n contractStartDate\n contractEndDate\n canUpdate: permission(action: \"iam:membership-profile:update\")\n}\n" + "text": "query PersonPageQuery(\n $personId: ID!\n) {\n person: node(id: $personId) {\n __typename\n ... on Profile {\n id\n fullName\n emailAddress\n source\n canDelete: permission(action: \"iam:membership-profile:delete\")\n ...PersonFormFragment\n }\n id\n }\n}\n\nfragment PersonFormFragment on Profile {\n id\n fullName\n emailAddress\n source\n membership {\n role\n id\n }\n kind\n position\n additionalEmailAddresses\n contractStartDate\n contractEndDate\n canUpdate: permission(action: \"iam:membership-profile:update\")\n}\n" } }; })(); -(node as any).hash = "c2954bc62ed4a3e3a9b1ca9596b68e1c"; +(node as any).hash = "4aecfb7a9ff05a585ccc6b533fb75bec"; export default node; diff --git a/apps/console/src/pages/iam/organizations/people/PersonPage.tsx b/apps/console/src/pages/iam/organizations/people/PersonPage.tsx index 55a12c732..52683cef0 100644 --- a/apps/console/src/pages/iam/organizations/people/PersonPage.tsx +++ b/apps/console/src/pages/iam/organizations/people/PersonPage.tsx @@ -1,6 +1,6 @@ import { sprintf } from "@probo/helpers"; import { useTranslate } from "@probo/i18n"; -import { ActionDropdown, Avatar, Breadcrumb, Card, DropdownItem, IconTrashCan, useConfirm } from "@probo/ui"; +import { ActionDropdown, Avatar, Badge, Breadcrumb, Card, DropdownItem, IconTrashCan, useConfirm } from "@probo/ui"; import { type PreloadedQuery, usePreloadedQuery } from "react-relay"; import { useNavigate } from "react-router"; import { graphql } from "relay-runtime"; @@ -18,9 +18,8 @@ export const personPageQuery = graphql` ... on Profile { id fullName - identity @required(action: THROW) { - email - } + emailAddress + source canDelete: permission(action: "iam:membership-profile:delete") ...PersonFormFragment } @@ -100,9 +99,11 @@ export function PersonPage(props: { queryRef: PreloadedQuery })
- -
{person.fullName}
-
{person.identity.email}
+
+ {person.fullName} + {person.source} +
+
{person.emailAddress}
{person.canDelete && ( diff --git a/apps/console/src/pages/iam/organizations/people/_components/PeopleListItem.tsx b/apps/console/src/pages/iam/organizations/people/_components/PeopleListItem.tsx index 5d4090e46..c78b9c6be 100644 --- a/apps/console/src/pages/iam/organizations/people/_components/PeopleListItem.tsx +++ b/apps/console/src/pages/iam/organizations/people/_components/PeopleListItem.tsx @@ -29,14 +29,12 @@ const fragment = graphql` source state fullName + emailAddress membership @required(action: THROW) { id role canUpdate: permission(action: "iam:membership:update") } - identity @required(action: THROW) { - email - } lastInvitation: pendingInvitations(first: 1, orderBy: { field: CREATED_AT, direction: DESC }) @required(action: THROW) @connection(key: "PeopleListItem_lastInvitation") { @@ -44,8 +42,6 @@ const fragment = graphql` edges { node { id - expiresAt - acceptedAt createdAt } } @@ -193,87 +189,85 @@ export function PeopleListItem(props: { }; return ( - <> - - + + {profile.fullName} + + + {profile.state} + + +
+ {profile.emailAddress} + {profile.source} +
+ + + void handleUpdateRole(role)} - > - {availableRoles.includes("OWNER") && ( - - )} - {availableRoles.includes("ADMIN") && ( - - )} - {availableRoles.includes("VIEWER") && ( - - )} - {availableRoles.includes("AUDITOR") && ( - - )} - {availableRoles.includes("EMPLOYEE") && ( - - )} - - - - {new Date(profile.createdAt).toLocaleDateString()} - - - - {isInactive && ( - - {lastInvitation ? __("Resend activation mail") : __("Send activation mail")} - - )} - {profile.canDelete && ( - - {__("Remove person")} - - )} - - - - + {availableRoles.includes("ADMIN") && ( + + )} + {availableRoles.includes("VIEWER") && ( + + )} + {availableRoles.includes("AUDITOR") && ( + + )} + {availableRoles.includes("EMPLOYEE") && ( + + )} + + + + {new Date(profile.createdAt).toLocaleDateString()} + + + + {isInactive && profile.source !== "SCIM" && profile.canInvite && ( + + {lastInvitation ? __("Resend activation mail") : __("Send activation mail")} + + )} + {profile.canDelete && profile.source !== "SCIM" && ( + + {__("Remove person")} + + )} + + + ); } diff --git a/apps/console/src/pages/iam/organizations/people/_components/PersonForm.tsx b/apps/console/src/pages/iam/organizations/people/_components/PersonForm.tsx index 7d93a1f12..4ea84bdd5 100644 --- a/apps/console/src/pages/iam/organizations/people/_components/PersonForm.tsx +++ b/apps/console/src/pages/iam/organizations/people/_components/PersonForm.tsx @@ -23,6 +23,7 @@ const fragment = graphql` id fullName emailAddress + source membership @required(action: THROW) { role } @@ -268,7 +269,7 @@ export function PersonFormLoader(props: { fragmentRef: PersonFormFragment$key }) return (