cr changes
[arvados-workbench2.git] / src / store / users / users-actions.ts
index e4465ddc85be7d278a475345e9768e1f3676c238..4780aa728362aa7fdf0d536ed583827e8a007321 100644 (file)
@@ -17,7 +17,7 @@ import { saveApiToken } from '~/store/auth/auth-action';
 export const USERS_PANEL_ID = 'usersPanel';
 export const USER_ATTRIBUTES_DIALOG = 'userAttributesDialog';
 export const USER_CREATE_FORM_NAME = 'userCreateFormName';
-export const USER_MANAGE_DIALOG = 'userManageDialog';
+export const USER_MANAGEMENT_DIALOG = 'userManageDialog';
 export const SETUP_SHELL_ACCOUNT_DIALOG = 'setupShellAccountDialog';
 
 export interface UserCreateFormDialogData {
@@ -33,11 +33,11 @@ export const openUserAttributes = (uuid: string) =>
         dispatch(dialogActions.OPEN_DIALOG({ id: USER_ATTRIBUTES_DIALOG, data }));
     };
 
-export const openUserManage = (uuid: string) =>
+export const openUserManagement = (uuid: string) =>
     (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const { resources } = getState();
         const data = getResource<UserResource>(uuid)(resources);
-        dispatch(dialogActions.OPEN_DIALOG({ id: USER_MANAGE_DIALOG, data }));
+        dispatch(dialogActions.OPEN_DIALOG({ id: USER_MANAGEMENT_DIALOG, data }));
     };
 
 export const openSetupShellAccount = (uuid: string) =>
@@ -45,11 +45,11 @@ export const openSetupShellAccount = (uuid: string) =>
         const { resources } = getState();
         const user = getResource<UserResource>(uuid)(resources);
         const virtualMachines = await services.virtualMachineService.list();
-        dispatch(dialogActions.CLOSE_DIALOG({ id: USER_MANAGE_DIALOG }));
+        dispatch(dialogActions.CLOSE_DIALOG({ id: USER_MANAGEMENT_DIALOG }));
         dispatch(dialogActions.OPEN_DIALOG({ id: SETUP_SHELL_ACCOUNT_DIALOG, data: { user, ...virtualMachines } }));
     };
 
-export const loginAs = (uuid: string) => 
+export const loginAs = (uuid: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const client = await services.apiClientAuthorizationService.get(uuid);
         dispatch<any>(saveApiToken(client.apiToken));