From 18a4e4a9802fcfdd5c742d62ce2c657c5d6b2187 Mon Sep 17 00:00:00 2001 From: Gitar Date: Wed, 11 Sep 2024 23:27:19 +0000 Subject: [PATCH 1/4] [Gitar] Updating TSX files --- .../admin/users/UsersList/UsersList.tsx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/frontend/src/component/admin/users/UsersList/UsersList.tsx b/frontend/src/component/admin/users/UsersList/UsersList.tsx index c03aa2a32237..8fcfc1e2fc03 100644 --- a/frontend/src/component/admin/users/UsersList/UsersList.tsx +++ b/frontend/src/component/admin/users/UsersList/UsersList.tsx @@ -36,7 +36,6 @@ import { RoleCell } from 'component/common/Table/cells/RoleCell/RoleCell'; import { useSearch } from 'hooks/useSearch'; import Download from '@mui/icons-material/Download'; import { StyledUsersLinkDiv } from '../Users.styles'; -import { useUiFlag } from 'hooks/useUiFlag'; import useUiConfig from '../../../../hooks/api/getters/useUiConfig/useUiConfig'; import { useScimSettings } from 'hooks/api/getters/useScimSettings/useScimSettings'; @@ -56,7 +55,6 @@ const UsersList = () => { }>({ open: false, }); - const userAccessUIEnabled = useUiFlag('userAccessUIEnabled'); const { settings: { enabled: scimEnabled }, } = useScimSettings(); @@ -204,22 +202,14 @@ const UsersList = () => { onEdit={() => { navigate(`/admin/users/${user.id}/edit`); }} - onViewAccess={ - userAccessUIEnabled - ? () => { - navigate( - `/admin/users/${user.id}/access`, - ); - } - : undefined - } + onViewAccess={undefined} onChangePassword={openPwDialog(user)} onResetPassword={openResetPwDialog(user)} onDelete={openDelDialog(user)} isScimUser={scimEnabled && Boolean(user.scimId)} /> ), - width: userAccessUIEnabled ? 240 : 200, + width: 200, disableSortBy: true, }, // Always hidden -- for search @@ -235,7 +225,7 @@ const UsersList = () => { searchable: true, }, ], - [roles, navigate, isBillingUsers, userAccessUIEnabled], + [roles, navigate, isBillingUsers, false], ); const initialState = useMemo(() => { From 8ed86de498191b944cbea721d612d3a2907151fc Mon Sep 17 00:00:00 2001 From: Gitar Date: Wed, 11 Sep 2024 23:27:19 +0000 Subject: [PATCH 2/4] [Gitar] Updating TypeScript files --- frontend/src/interfaces/uiConfig.ts | 1 - src/lib/types/experimental.ts | 5 ----- src/server-dev.ts | 1 - 3 files changed, 7 deletions(-) diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 65070583ec71..34bf63f936f6 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -75,7 +75,6 @@ export type UiFlags = { feedbackComments?: Variant; showInactiveUsers?: boolean; featureSearchFeedbackPosting?: boolean; - userAccessUIEnabled?: boolean; outdatedSdksBanner?: boolean; displayTrafficDataUsage?: boolean; estimateTrafficDataCost?: boolean; diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 09e56e2bc3eb..49934f65ef82 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -42,7 +42,6 @@ export type IFlagKey = | 'estimateTrafficDataCost' | 'useMemoizedActiveTokens' | 'queryMissingTokens' - | 'userAccessUIEnabled' | 'disableUpdateMaxRevisionId' | 'disablePublishUnannouncedEvents' | 'outdatedSdksBanner' @@ -223,10 +222,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_ESTIMATE_TRAFFIC_DATA_COST, false, ), - userAccessUIEnabled: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_USER_ACCESS_UI_ENABLED, - false, - ), disableUpdateMaxRevisionId: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_DISABLE_SCHEDULED_CACHES, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index be7e586391db..949611f0fb36 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -43,7 +43,6 @@ process.nextTick(async () => { stripHeadersOnAPI: true, celebrateUnleash: true, featureSearchFeedbackPosting: true, - userAccessUIEnabled: true, outdatedSdksBanner: true, disableShowContextFieldSelectionValues: false, projectOverviewRefactorFeedback: true, From 26def3753b7914234086b92b5f20125b57f89cd8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Sep 2024 23:34:50 +0000 Subject: [PATCH 3/4] Gitar Duet for #1666 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c130c2bdf68f..9c1f28c37d49 100644 --- a/package.json +++ b/package.json @@ -248,4 +248,4 @@ ] }, "packageManager": "yarn@4.4.1" -} \ No newline at end of file +} From 67895a9c783ba7344d0543abb0780d37e0493454 Mon Sep 17 00:00:00 2001 From: Gitar Date: Wed, 18 Sep 2024 03:52:55 +0000 Subject: [PATCH 4/4] [DJ] Cleanup --- .../admin/users/UsersList/UsersList.tsx | 16 +++++++++++++--- package.json | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/frontend/src/component/admin/users/UsersList/UsersList.tsx b/frontend/src/component/admin/users/UsersList/UsersList.tsx index 8fcfc1e2fc03..c03aa2a32237 100644 --- a/frontend/src/component/admin/users/UsersList/UsersList.tsx +++ b/frontend/src/component/admin/users/UsersList/UsersList.tsx @@ -36,6 +36,7 @@ import { RoleCell } from 'component/common/Table/cells/RoleCell/RoleCell'; import { useSearch } from 'hooks/useSearch'; import Download from '@mui/icons-material/Download'; import { StyledUsersLinkDiv } from '../Users.styles'; +import { useUiFlag } from 'hooks/useUiFlag'; import useUiConfig from '../../../../hooks/api/getters/useUiConfig/useUiConfig'; import { useScimSettings } from 'hooks/api/getters/useScimSettings/useScimSettings'; @@ -55,6 +56,7 @@ const UsersList = () => { }>({ open: false, }); + const userAccessUIEnabled = useUiFlag('userAccessUIEnabled'); const { settings: { enabled: scimEnabled }, } = useScimSettings(); @@ -202,14 +204,22 @@ const UsersList = () => { onEdit={() => { navigate(`/admin/users/${user.id}/edit`); }} - onViewAccess={undefined} + onViewAccess={ + userAccessUIEnabled + ? () => { + navigate( + `/admin/users/${user.id}/access`, + ); + } + : undefined + } onChangePassword={openPwDialog(user)} onResetPassword={openResetPwDialog(user)} onDelete={openDelDialog(user)} isScimUser={scimEnabled && Boolean(user.scimId)} /> ), - width: 200, + width: userAccessUIEnabled ? 240 : 200, disableSortBy: true, }, // Always hidden -- for search @@ -225,7 +235,7 @@ const UsersList = () => { searchable: true, }, ], - [roles, navigate, isBillingUsers, false], + [roles, navigate, isBillingUsers, userAccessUIEnabled], ); const initialState = useMemo(() => { diff --git a/package.json b/package.json index 9c1f28c37d49..c130c2bdf68f 100644 --- a/package.json +++ b/package.json @@ -248,4 +248,4 @@ ] }, "packageManager": "yarn@4.4.1" -} +} \ No newline at end of file