[arvados-workbench2] updated: 2.7.0-228-gd6a65943
git repository hosting
git at public.arvados.org
Thu Nov 30 16:12:57 UTC 2023
Summary of changes:
src/components/multiselect-toolbar/MultiselectToolbar.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
via d6a6594331db032aa563ef7868eeae1426cba909 (commit)
from 02501b107b00164979eaf6fc5dbc4e3b60deefc9 (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 d6a6594331db032aa563ef7868eeae1426cba909
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 30 11:12:53 2023 -0500
21128: handled null user Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/components/multiselect-toolbar/MultiselectToolbar.tsx b/src/components/multiselect-toolbar/MultiselectToolbar.tsx
index 47157697..e1ddaae8 100644
--- a/src/components/multiselect-toolbar/MultiselectToolbar.tsx
+++ b/src/components/multiselect-toolbar/MultiselectToolbar.tsx
@@ -22,7 +22,6 @@ import { copyToClipboardAction } from "store/open-in-new-tab/open-in-new-tab.act
import { ContainerRequestResource } from "models/container-request";
import { FavoritesState } from "store/favorites/favorites-reducer";
import { resourceIsFrozen } from "common/frozen-resources";
-import { ProjectResource } from "models/project";
import { getResourceWithEditableStatus } from "store/resources/resources";
import { GroupResource } from "models/group";
import { EditableResource } from "models/resource";
@@ -55,7 +54,7 @@ export type MultiselectToolbarProps = {
checkedList: TCheckedList;
selectedUuid: string | null
iconProps: IconProps
- user: User
+ user: User | null
executeMulti: (action: ContextMenuAction, checkedList: TCheckedList, resources: ResourcesState) => void;
};
@@ -153,7 +152,8 @@ function filterActions(actionArray: MultiSelectMenuActionSet, filters: Set<strin
return actionArray[0].filter(action => filters.has(action.name as string));
}
-const resourceToMsResourceKind = (uuid: string, resources: ResourcesState, user: User, readonly = false): (msMenuResourceKind | ResourceKind) | undefined => {
+const resourceToMsResourceKind = (uuid: string, resources: ResourcesState, user: User | null, readonly = false): (msMenuResourceKind | ResourceKind) | undefined => {
+ if (!user) return;
const resource = getResourceWithEditableStatus<GroupResource & EditableResource>(uuid, user.uuid)(resources);
const { isAdmin } = user;
const kind = extractUuidKind(uuid);
@@ -274,7 +274,7 @@ function mapStateToProps({auth, multiselect, resources, favorites}: RootState) {
return {
checkedList: multiselect.checkedList as TCheckedList,
selectedUuid: isExactlyOneSelected(multiselect.checkedList),
- user: auth.user,
+ user: auth && auth.user ? auth.user : null,
iconProps: {
resources,
favorites
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list