X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/5017989693137cabe7f00a00c51db35625f9b55f..24574669fd453c6846bc9f64ce9ae407db79568b:/src/store/users/users-actions.ts diff --git a/src/store/users/users-actions.ts b/src/store/users/users-actions.ts index e4465ddc..4780aa72 100644 --- a/src/store/users/users-actions.ts +++ b/src/store/users/users-actions.ts @@ -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(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(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(saveApiToken(client.apiToken));