From c8198e82d197977052156b0f502396ec116a76c7 Mon Sep 17 00:00:00 2001 From: Pawel Kowalczyk Date: Wed, 24 Apr 2019 11:04:59 +0200 Subject: [PATCH] adding-to-public-favorites-from-shared-with me Feature #15120 Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk --- src/index.tsx | 2 -- src/views/shared-with-me-panel/shared-with-me-panel.tsx | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 9f9b27ca..9c7b39aa 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -14,7 +14,6 @@ import { configureStore, RootStore } from '~/store/store'; import { ConnectedRouter } from "react-router-redux"; import { ApiToken } from "~/views-components/api-token/api-token"; import { initAuth } from "~/store/auth/auth-action"; -import { configActions } from "~/store/config/config-action"; import { createServices } from "~/services/services"; import { MuiThemeProvider } from '@material-ui/core/styles'; import { CustomTheme } from '~/common/custom-theme'; @@ -40,7 +39,6 @@ import { addRouteChangeHandlers } from './routes/route-change-handlers'; import { setCurrentTokenDialogApiHost } from '~/store/current-token-dialog/current-token-dialog-actions'; import { processResourceActionSet } from '~/views-components/context-menu/action-sets/process-resource-action-set'; import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions'; -import { setUuidPrefix } from '~/store/workflow-panel/workflow-panel-actions'; import { trashedCollectionActionSet } from '~/views-components/context-menu/action-sets/trashed-collection-action-set'; import { ContainerRequestState } from '~/models/container-request'; import { MountKind } from '~/models/mount-types'; diff --git a/src/views/shared-with-me-panel/shared-with-me-panel.tsx b/src/views/shared-with-me-panel/shared-with-me-panel.tsx index 582aa9c7..7fd00ba1 100644 --- a/src/views/shared-with-me-panel/shared-with-me-panel.tsx +++ b/src/views/shared-with-me-panel/shared-with-me-panel.tsx @@ -31,13 +31,15 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ interface SharedWithMePanelDataProps { resources: ResourcesState; + isAdmin: boolean; } type SharedWithMePanelProps = SharedWithMePanelDataProps & DispatchProp & WithStyles; export const SharedWithMePanel = withStyles(styles)( connect((state: RootState) => ({ - resources: state.resources + resources: state.resources, + isAdmin: state.auth.user!.isAdmin }))( class extends React.Component { render() { @@ -51,7 +53,7 @@ export const SharedWithMePanel = withStyles(styles)( } handleContextMenu = (event: React.MouseEvent, resourceUuid: string) => { - const menuKind = resourceKindToContextMenuKind(resourceUuid); + const menuKind = resourceKindToContextMenuKind(resourceUuid, this.props.isAdmin); const resource = getResource(resourceUuid)(this.props.resources); if (menuKind && resource) { this.props.dispatch(openContextMenu(event, { -- 2.30.2