refs #15120-adding-to-public-favs-from-side-panel
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 30 Apr 2019 08:22:57 +0000 (10:22 +0200)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 30 Apr 2019 08:22:57 +0000 (10:22 +0200)
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/store/context-menu/context-menu-actions.ts

index b21ca0a7688ae324f09edc6f30e294b86665cb9c..431d15e8495c87e311678c66da64e6f6ec23524b 100644 (file)
@@ -152,12 +152,13 @@ export const openRootProjectContextMenu = (event: React.MouseEvent<HTMLElement>,
 export const openProjectContextMenu = (event: React.MouseEvent<HTMLElement>, projectUuid: string) =>
     (dispatch: Dispatch, getState: () => RootState) => {
         const res = getResource<ProjectResource>(projectUuid)(getState().resources);
+        const isAdmin = getState().auth.user!.isAdmin;
         if (res) {
             dispatch<any>(openContextMenu(event, {
                 name: res.name,
                 uuid: res.uuid,
                 kind: res.kind,
-                menuKind: ContextMenuKind.PROJECT,
+                menuKind: !isAdmin ? ContextMenuKind.PROJECT : ContextMenuKind.PROJECT_ADMIN,
                 ownerUuid: res.ownerUuid,
                 isTrashed: res.isTrashed
             }));