From 4d955624f7e612702d045a971addc1e20b8d6bd5 Mon Sep 17 00:00:00 2001 From: Siarhei Iukou Date: Wed, 25 Sep 2024 15:58:15 +0300 Subject: [PATCH] EPMRPP-95442 || Add new widget button should not be visible for the Member Viewer --- .../LaunchToolbar/actionPanel/actionPanel.jsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/pages/inside/launchesPage/LaunchToolbar/actionPanel/actionPanel.jsx b/app/src/pages/inside/launchesPage/LaunchToolbar/actionPanel/actionPanel.jsx index ee6207e006..1bb1b8c620 100644 --- a/app/src/pages/inside/launchesPage/LaunchToolbar/actionPanel/actionPanel.jsx +++ b/app/src/pages/inside/launchesPage/LaunchToolbar/actionPanel/actionPanel.jsx @@ -232,8 +232,9 @@ export class ActionPanel extends Component { }; isShowWidgetButton = () => { - const { activeFilterId } = this.props; - return Number.isInteger(activeFilterId); + const { activeFilterId, userRoles } = this.props; + + return Number.isInteger(activeFilterId) && canWorkWithWidgets(userRoles); }; renderCounterNotification = (number) => {number}; @@ -252,7 +253,6 @@ export class ActionPanel extends Component { restorePath, onAddNewWidget, finishedLaunchesCount, - userRoles, isImportPluginsAvailable, } = this.props; const actionDescriptors = this.createActionDescriptors(); @@ -293,11 +293,7 @@ export class ActionPanel extends Component { )} {this.isShowWidgetButton() && (
- +