X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e0effe9fd43b8d7c0d7fcb9aade9b718cf5dddda..736b2d3cc858cfba93bedf5367f5af6c1852fcfe:/src/views-components/context-menu/action-sets/user-action-set.ts diff --git a/src/views-components/context-menu/action-sets/user-action-set.ts b/src/views-components/context-menu/action-sets/user-action-set.ts index 7b0884e6..987eb1c8 100644 --- a/src/views-components/context-menu/action-sets/user-action-set.ts +++ b/src/views-components/context-menu/action-sets/user-action-set.ts @@ -2,10 +2,20 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set"; -import { AdvancedIcon, ProjectIcon, AttributesIcon, UserPanelIcon } from "~/components/icon/icon"; -import { openAdvancedTabDialog } from '~/store/advanced-tab/advanced-tab'; -import { openUserAttributes, openUserProjects } from "~/store/users/users-actions"; +import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set"; +import { + AdvancedIcon, + ProjectIcon, + AttributesIcon, + DeactivateUserIcon, + UserPanelIcon, + LoginAsIcon, + AdminMenuIcon, +} from "components/icon/icon"; +import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab'; +import { loginAs, openUserAttributes, openUserProjects } from "store/users/users-actions"; +import { openSetupDialog, openDeactivateDialog } from "store/user-profile/user-profile-actions"; +import { navigateToUserProfile } from "store/navigation/navigation-action"; export const userActionSet: ContextMenuActionSet = [[{ name: "Attributes", @@ -25,11 +35,30 @@ export const userActionSet: ContextMenuActionSet = [[{ execute: (dispatch, { uuid }) => { dispatch(openAdvancedTabDialog(uuid)); } -}, -{ - name: "Manage", +}, { + name: "Account Settings", icon: UserPanelIcon, execute: (dispatch, { uuid }) => { - dispatch(openAdvancedTabDialog(uuid)); + dispatch(navigateToUserProfile(uuid)); + } +}, { + name: "Setup User", + icon: AdminMenuIcon, + execute: (dispatch, { uuid }) => { + dispatch(openSetupDialog(uuid)); + } +}, { + name: "Deactivate User", + icon: DeactivateUserIcon, + execute: (dispatch, { uuid }) => { + dispatch(openDeactivateDialog(uuid)); } -}]]; +}, { + name: "Login As User", + icon: LoginAsIcon, + execute: (dispatch, { uuid }) => { + dispatch(loginAs(uuid)); + } +}, + +]];