@rh-support/manage 0.2.25 → 0.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ManageTabs.d.ts","sourceRoot":"","sources":["../../src/ManageTabs.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;CACvC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eAgKvC"}
1
+ {"version":3,"file":"ManageTabs.d.ts","sourceRoot":"","sources":["../../src/ManageTabs.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;CACvC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eA0JvC"}
@@ -1,7 +1,7 @@
1
1
  import { ErrorBoundary, useDocumentTitle } from '@rh-support/components';
2
2
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
3
3
  import { ability, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
4
- import { CustomElements, getConfigField, getFieldInParts, PCM_CONFIG_FIELD_TYPE, requireCustomElement, } from '@rh-support/utils';
4
+ import { CustomElements, getConfigField, PCM_CONFIG_FIELD_TYPE, requireCustomElement } from '@rh-support/utils';
5
5
  import map from 'lodash/map';
6
6
  import React, { useContext } from 'react';
7
7
  import { ConfigsTable } from './components/Configs/ConfigsTable';
@@ -23,10 +23,9 @@ export function ManageTabs(props) {
23
23
  var _a, _b;
24
24
  const history = props.routeProps.history;
25
25
  const { groupsRoute, bookmarkedAccountsRoute, topContentRoute, notificationEmailsRoute, preferencesRoute, configsRoute, } = Routes.getPaths();
26
- const { globalMetadataState: { pcmConfig, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
26
+ const { globalMetadataState: { pcmConfig }, } = useContext(GlobalMetadataStateContext);
27
27
  const isGroupBookmarkEnabled = getConfigField(pcmConfig.data, 'isGroupBookmarkEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
28
28
  const isPreferencesPageEnabled = getConfigField(pcmConfig.data, 'allowPreferencesPage', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
29
- const pcmConfigEditorsSSOList = getFieldInParts(pcmConfig.data, 'pcmConfigEditorsSSO', PCM_CONFIG_FIELD_TYPE.STRING_COMMA_SEPERATED);
30
29
  // Changes route and saves the current path to the url query params
31
30
  const isOnlyBasePath = history.location.pathname === Routes.basePath;
32
31
  useDocumentTitle(PageTitle.MANAGE);
@@ -40,7 +39,7 @@ export function ManageTabs(props) {
40
39
  const canManageBookmarkAccounts = ability.can(resourceActions.CREATE, resources.BOOKMARK_ACCOUNTS) && canViewManageTab;
41
40
  const canViewEmailNotificationTab = ability.can(resourceActions.READ, resources.NOTIFICATION_EMAIL);
42
41
  const canAddCustomNotification = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
43
- const canViewConfigs = pcmConfigEditorsSSOList.includes(loggedInUserRights.data.getSSOUsername());
42
+ const canViewConfigsTab = ability.can(resourceActions.READ, resources.APP_INTERNAL_CONFIGS);
44
43
  const tabsToRender = [];
45
44
  canManageBookmarkAccounts &&
46
45
  tabsToRender.push({
@@ -98,7 +97,7 @@ export function ManageTabs(props) {
98
97
  },
99
98
  component: React.createElement(TopContentManagement, null),
100
99
  });
101
- canViewConfigs &&
100
+ canViewConfigsTab &&
102
101
  tabsToRender.push({
103
102
  title: 'Internal Configs',
104
103
  key: 'pcm-internal-configs-tab',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "homepage": "",
@@ -97,11 +97,11 @@
97
97
  "@patternfly/react-core": "4.128.2",
98
98
  "@patternfly/react-table": "4.26.7",
99
99
  "@rh-support/api": "0.3.9",
100
- "@rh-support/components": "1.1.17",
100
+ "@rh-support/components": "1.1.18",
101
101
  "@rh-support/configs": "0.2.3",
102
- "@rh-support/react-context": "0.2.19",
102
+ "@rh-support/react-context": "0.2.20",
103
103
  "@rh-support/types": "0.2.0",
104
- "@rh-support/user-permissions": "0.2.13",
104
+ "@rh-support/user-permissions": "0.2.14",
105
105
  "@rh-support/utils": "0.2.13",
106
106
  "@types/react-beautiful-dnd": "^13.0.0",
107
107
  "i18next": ">=17.0.1",
@@ -113,5 +113,5 @@
113
113
  "react-i18next": ">=10.11.0",
114
114
  "react-router-dom": ">=5.1.2"
115
115
  },
116
- "gitHead": "76d987895943b6cb401d9dae98424e50cdedb38f"
116
+ "gitHead": "b9f20c8bd5998759479b46035e8dc8202977f527"
117
117
  }