X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4b956bd2e3bcccdeb808df7391d135659cf85b94..198ae2eb95d997550d1d647916b38bb8b3f536e9:/src/index.tsx

diff --git a/src/index.tsx b/src/index.tsx
index 6ad22a5516..03840d49ad 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -29,7 +29,6 @@ import { collectionFilesActionSet, readOnlyCollectionFilesActionSet } from 'view
 import { collectionDirectoryItemActionSet, collectionFileItemActionSet, readOnlyCollectionDirectoryItemActionSet, readOnlyCollectionFileItemActionSet } from 'views-components/context-menu/action-sets/collection-files-item-action-set';
 import { collectionFilesNotSelectedActionSet } from 'views-components/context-menu/action-sets/collection-files-not-selected-action-set';
 import { collectionActionSet, collectionAdminActionSet, oldCollectionVersionActionSet, readOnlyCollectionActionSet } from 'views-components/context-menu/action-sets/collection-action-set';
-import { processActionSet } from 'views-components/context-menu/action-sets/process-action-set';
 import { loadWorkbench } from 'store/workbench/workbench-actions';
 import { Routes } from 'routes/routes';
 import { trashActionSet } from "views-components/context-menu/action-sets/trash-action-set";
@@ -38,7 +37,11 @@ import { initWebSocket } from 'websocket/websocket';
 import { Config } from 'common/config';
 import { addRouteChangeHandlers } from './routes/route-change-handlers';
 import { setTokenDialogApiHost } from 'store/token-dialog/token-dialog-actions';
-import { processResourceActionSet, readOnlyProcessResourceActionSet } from 'views-components/context-menu/action-sets/process-resource-action-set';
+import {
+    processResourceActionSet,
+    processResourceAdminActionSet,
+    readOnlyProcessResourceActionSet
+} from 'views-components/context-menu/action-sets/process-resource-action-set';
 import { progressIndicatorActions } from 'store/progress-indicator/progress-indicator-actions';
 import { trashedCollectionActionSet } from 'views-components/context-menu/action-sets/trashed-collection-action-set';
 import { setBuildInfo } from 'store/app-info/app-info-actions';
@@ -57,8 +60,9 @@ import { groupActionSet } from 'views-components/context-menu/action-sets/group-
 import { groupMemberActionSet } from 'views-components/context-menu/action-sets/group-member-action-set';
 import { linkActionSet } from 'views-components/context-menu/action-sets/link-action-set';
 import { loadFileViewersConfig } from 'store/file-viewers/file-viewers-actions';
-import { processResourceAdminActionSet } from 'views-components/context-menu/action-sets/process-resource-admin-action-set';
 import { filterGroupAdminActionSet, projectAdminActionSet } from 'views-components/context-menu/action-sets/project-admin-action-set';
+import { permissionEditActionSet } from 'views-components/context-menu/action-sets/permission-edit-action-set';
+import { workflowActionSet } from 'views-components/context-menu/action-sets/workflow-action-set';
 import { snackbarActions, SnackbarKind } from "store/snackbar/snackbar-actions";
 import { openNotFoundDialog } from './store/not-found-panel/not-found-panel-action';
 import { storeRedirects } from './common/redirect-to';
@@ -82,7 +86,6 @@ addMenuActionSet(ContextMenuKind.COLLECTION, collectionActionSet);
 addMenuActionSet(ContextMenuKind.READONLY_COLLECTION, readOnlyCollectionActionSet);
 addMenuActionSet(ContextMenuKind.OLD_VERSION_COLLECTION, oldCollectionVersionActionSet);
 addMenuActionSet(ContextMenuKind.TRASHED_COLLECTION, trashedCollectionActionSet);
-addMenuActionSet(ContextMenuKind.PROCESS, processActionSet);
 addMenuActionSet(ContextMenuKind.PROCESS_RESOURCE, processResourceActionSet);
 addMenuActionSet(ContextMenuKind.READONLY_PROCESS_RESOURCE, readOnlyProcessResourceActionSet);
 addMenuActionSet(ContextMenuKind.TRASH, trashActionSet);
@@ -99,6 +102,8 @@ addMenuActionSet(ContextMenuKind.COLLECTION_ADMIN, collectionAdminActionSet);
 addMenuActionSet(ContextMenuKind.PROCESS_ADMIN, processResourceAdminActionSet);
 addMenuActionSet(ContextMenuKind.PROJECT_ADMIN, projectAdminActionSet);
 addMenuActionSet(ContextMenuKind.FILTER_GROUP_ADMIN, filterGroupAdminActionSet);
+addMenuActionSet(ContextMenuKind.PERMISSION_EDIT, permissionEditActionSet);
+addMenuActionSet(ContextMenuKind.WORKFLOW, workflowActionSet);
 
 storeRedirects();
 
@@ -181,7 +186,7 @@ const initListener = (history: History, store: RootStore, services: ServiceRepos
     let initialized = false;
     return async () => {
         const { router, auth } = store.getState();
-        if (router.location && auth.user && !initialized) {
+        if (router.location && auth.user && services.authService.getApiToken() && !initialized) {
             initialized = true;
             initWebSocket(config, services.authService, store);
             await store.dispatch(loadWorkbench());
