16437: Removes context items when projects are not editable by user
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / user-action-set.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
6 import { AdvancedIcon, ProjectIcon, AttributesIcon } from "~/components/icon/icon";
7 import { openAdvancedTabDialog } from '~/store/advanced-tab/advanced-tab';
8 import { openUserAttributes, openUserProjects } from "~/store/users/users-actions";
9
10 export const userActionSet: ContextMenuActionSet = [[{
11     name: "Attributes",
12     icon: AttributesIcon,
13     execute: (dispatch, { uuid }) => {
14         dispatch<any>(openUserAttributes(uuid));
15     }
16 }, {
17     name: "Project",
18     icon: ProjectIcon,
19     execute: (dispatch, { uuid }) => {
20         dispatch<any>(openUserProjects(uuid));
21     }
22 }, {
23     name: "Advanced",
24     icon: AdvancedIcon,
25     execute: (dispatch, { uuid }) => {
26         dispatch<any>(openAdvancedTabDialog(uuid));
27     }
28 }, /*
29     // Neither of the buttons on this dialog work correctly (bugs #16114 and #16124) so hide it for now.
30     {
31     name: "Manage",
32     icon: UserPanelIcon,
33     execute: (dispatch, { uuid }) => {
34         dispatch<any>(openUserManagement(uuid));
35     }
36 } */
37 ]];