[arvados] updated: 2.7.0-6038-g48be312b0a
git repository hosting
git at public.arvados.org
Fri Feb 23 19:20:32 UTC 2024
Summary of changes:
services/workbench2/src/index.tsx | 2 +
...er-action-set.ts => user-details-action-set.ts} | 45 +---------------------
.../views-components/context-menu/context-menu.tsx | 1 +
.../project-details-card/project-details-card.tsx | 7 ++--
4 files changed, 9 insertions(+), 46 deletions(-)
copy services/workbench2/src/views-components/context-menu/action-sets/{user-action-set.ts => user-details-action-set.ts} (53%)
via 48be312b0a5ad415d3fd5a21625cb48678010d6d (commit)
from 6b72f026b7f9f47b42bc26aaed86b021ce8e0eb6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 48be312b0a5ad415d3fd5a21625cb48678010d6d
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Feb 23 14:20:23 2024 -0500
21224: created separate action set for home projects Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/services/workbench2/src/index.tsx b/services/workbench2/src/index.tsx
index ef9ff9c986..c024f9396f 100644
--- a/services/workbench2/src/index.tsx
+++ b/services/workbench2/src/index.tsx
@@ -76,6 +76,7 @@ import { keepServiceActionSet } from "views-components/context-menu/action-sets/
import { loadVocabulary } from "store/vocabulary/vocabulary-actions";
import { virtualMachineActionSet } from "views-components/context-menu/action-sets/virtual-machine-action-set";
import { userActionSet } from "views-components/context-menu/action-sets/user-action-set";
+import { UserDetailsActionSet } from "views-components/context-menu/action-sets/user-details-action-set";
import { apiClientAuthorizationActionSet } from "views-components/context-menu/action-sets/api-client-authorization-action-set";
import { groupActionSet } from "views-components/context-menu/action-sets/group-action-set";
import { groupMemberActionSet } from "views-components/context-menu/action-sets/group-member-action-set";
@@ -124,6 +125,7 @@ addMenuActionSet(ContextMenuKind.SSH_KEY, sshKeyActionSet);
addMenuActionSet(ContextMenuKind.VIRTUAL_MACHINE, virtualMachineActionSet);
addMenuActionSet(ContextMenuKind.KEEP_SERVICE, keepServiceActionSet);
addMenuActionSet(ContextMenuKind.USER, userActionSet);
+addMenuActionSet(ContextMenuKind.USER_DETAILS, UserDetailsActionSet);
addMenuActionSet(ContextMenuKind.LINK, linkActionSet);
addMenuActionSet(ContextMenuKind.API_CLIENT_AUTHORIZATION, apiClientAuthorizationActionSet);
addMenuActionSet(ContextMenuKind.GROUPS, groupActionSet);
diff --git a/services/workbench2/src/views-components/context-menu/action-sets/user-details-action-set.ts b/services/workbench2/src/views-components/context-menu/action-sets/user-details-action-set.ts
new file mode 100644
index 0000000000..2d365bc37f
--- /dev/null
+++ b/services/workbench2/src/views-components/context-menu/action-sets/user-details-action-set.ts
@@ -0,0 +1,54 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import {
+ AdvancedIcon,
+ ProjectIcon,
+ AttributesIcon,
+ DeactivateUserIcon,
+ UserPanelIcon,
+ LoginAsIcon,
+ AdminMenuIcon,
+ ActiveIcon,
+} from 'components/icon/icon';
+import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
+import { loginAs, openUserAttributes, openUserProjects } from 'store/users/users-actions';
+import { openSetupDialog, openDeactivateDialog, openActivateDialog } from 'store/user-profile/user-profile-actions';
+import { navigateToUserProfile } from 'store/navigation/navigation-action';
+import {
+ canActivateUser,
+ canDeactivateUser,
+ canSetupUser,
+ isAdmin,
+ needsUserProfileLink,
+ isOtherUser,
+} from 'store/context-menu/context-menu-filters';
+
+export const UserDetailsActionSet: ContextMenuActionSet = [
+ [
+ {
+ name: 'Attributes',
+ icon: AttributesIcon,
+ execute: (dispatch, resources) => {
+ dispatch<any>(openUserAttributes(resources[0].uuid));
+ },
+ },
+ {
+ name: 'API Details',
+ icon: AdvancedIcon,
+ execute: (dispatch, resources) => {
+ dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
+ },
+ },
+ {
+ name: 'User Account',
+ icon: UserPanelIcon,
+ execute: (dispatch, resources) => {
+ dispatch<any>(navigateToUserProfile(resources[0].uuid));
+ },
+ filters: [needsUserProfileLink],
+ },
+ ],
+];
diff --git a/services/workbench2/src/views-components/context-menu/context-menu.tsx b/services/workbench2/src/views-components/context-menu/context-menu.tsx
index aeb69de762..ae37c4d923 100644
--- a/services/workbench2/src/views-components/context-menu/context-menu.tsx
+++ b/services/workbench2/src/views-components/context-menu/context-menu.tsx
@@ -113,6 +113,7 @@ export enum ContextMenuKind {
VIRTUAL_MACHINE = "VirtualMachine",
KEEP_SERVICE = "KeepService",
USER = "User",
+ USER_DETAILS = "UserDetails",
GROUPS = "Group",
GROUP_MEMBER = "GroupMember",
PERMISSION_EDIT = "PermissionEdit",
diff --git a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
index 4c37281cdd..c102e478fd 100644
--- a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
+++ b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
@@ -147,10 +147,11 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
if (resource.groupClass === 'filter') {
readOnly = true;
}
- const menuKind = dispatch<any>(resourceUuidToContextMenuKind(resource.uuid, readOnly));
+ let menuKind = dispatch<any>(resourceUuidToContextMenuKind(resource.uuid, readOnly));
if (menuKind === ContextMenuKind.ROOT_PROJECT) {
- dispatch<any>(openUserContextMenu(event, resource as UserResource));
- } else if (menuKind && resource) {
+ menuKind = ContextMenuKind.USER_DETAILS;
+ }
+ if (menuKind && resource) {
dispatch<any>(
openContextMenu(event, {
name: resource.name,
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list