From 3fe9743d4a76be7d6ffd68dcf528d6e9006b3cc6 Mon Sep 17 00:00:00 2001 From: Vadzim Hvazdovich Date: Thu, 21 Dec 2023 14:48:43 +0300 Subject: [PATCH] EPMRPP-88832 || "Add Project integration" button is disabled for custom Admin role --- .../integrationsList/integrationInfo/integrationInfo.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/integrationInfo.jsx b/app/src/pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/integrationInfo.jsx index eb2bea2529..330d98ca98 100644 --- a/app/src/pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/integrationInfo.jsx +++ b/app/src/pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/integrationInfo.jsx @@ -22,9 +22,9 @@ import PropTypes from 'prop-types'; import { useIntl } from 'react-intl'; import { useTracking } from 'react-tracking'; import { - isAdminSelector, activeProjectRoleSelector, activeProjectSelector, + userAccountRoleSelector, } from 'controllers/user'; import { uiExtensionIntegrationSettingsSelector } from 'controllers/plugins/uiExtensions/selectors'; import { canUpdateSettings } from 'common/utils/permissions'; @@ -56,12 +56,12 @@ export const IntegrationInfo = (props) => { const { formatMessage } = useIntl(); const { trackEvent } = useTracking(); const settingsExtensions = useSelector(uiExtensionIntegrationSettingsSelector); - const isAdmin = useSelector(isAdminSelector); + const accountRole = useSelector(userAccountRoleSelector); const userProjectRole = useSelector(activeProjectRoleSelector); const globalIntegrations = useSelector(namedGlobalIntegrationsSelector); const projectIntegrations = useSelector(namedProjectIntegrationsSelector); const activeProject = useSelector(activeProjectSelector); - const isAbleToClick = canUpdateSettings(isAdmin, userProjectRole); + const isAbleToClick = canUpdateSettings(accountRole, userProjectRole); const dispatch = useDispatch(); const { plugin: { name: pluginName, details = {} },