Merge branch 'main' into 18368-notification-banner
[arvados.git] / src / views / user-profile-panel / user-profile-panel.tsx
index 7a55faf3300c2f5e6f218c010f429b34d7e95d0e..a90d44a9a7a7d207e5ca3d4ea6b425acca21d356 100644 (file)
@@ -7,11 +7,10 @@ import { compose, Dispatch } from 'redux';
 import { reduxForm, isPristine, isValid } from 'redux-form';
 import { connect } from 'react-redux';
 import { UserResource } from 'models/user';
-import { saveEditedUser } from 'store/user-profile/user-profile-actions';
+import { getUserProfileIsInaccessible, saveEditedUser } from 'store/user-profile/user-profile-actions';
 import { UserProfilePanelRoot, UserProfilePanelRootDataProps } from 'views/user-profile-panel/user-profile-panel-root';
-import { openSetupDialog, openDeactivateDialog, USER_PROFILE_FORM } from "store/user-profile/user-profile-actions";
+import { USER_PROFILE_FORM } from "store/user-profile/user-profile-actions";
 import { matchUserProfileRoute } from 'routes/routes';
-import { loginAs } from 'store/users/users-actions';
 import { openUserContextMenu } from 'store/context-menu/context-menu-actions';
 
 const mapStateToProps = (state: RootState): UserProfilePanelRootDataProps => {
@@ -24,15 +23,13 @@ const mapStateToProps = (state: RootState): UserProfilePanelRootDataProps => {
     isSelf: state.auth.user!.uuid === uuid,
     isPristine: isPristine(USER_PROFILE_FORM)(state),
     isValid: isValid(USER_PROFILE_FORM)(state),
+    isInaccessible: getUserProfileIsInaccessible(state.properties) || false,
     localCluster: state.auth.localCluster,
     userUuid: uuid,
     resources: state.resources,
 }};
 
 const mapDispatchToProps = (dispatch: Dispatch) => ({
-    openSetupDialog: (uuid: string) => dispatch<any>(openSetupDialog(uuid)),
-    loginAs: (uuid: string) => dispatch<any>(loginAs(uuid)),
-    openDeactivateDialog: (uuid: string) => dispatch<any>(openDeactivateDialog(uuid)),
     handleContextMenu: (event, resource: UserResource) => dispatch<any>(openUserContextMenu(event, resource)),
 });