18874: Merge commit '6f8dcb2b13f3058db656908fb26b09e23b527f08' into 18874-merge-wb2
[arvados.git] / services / workbench2 / src / views / user-profile-panel / user-profile-panel.tsx
index a90d44a9a7a7d207e5ca3d4ea6b425acca21d356..040cbc6f4aa1304e92f121cc8a36f2509873779b 100644 (file)
@@ -14,20 +14,22 @@ import { matchUserProfileRoute } from 'routes/routes';
 import { openUserContextMenu } from 'store/context-menu/context-menu-actions';
 
 const mapStateToProps = (state: RootState): UserProfilePanelRootDataProps => {
-  const pathname = state.router.location ? state.router.location.pathname : '';
-  const match = matchUserProfileRoute(pathname);
-  const uuid = match ? match.params.id : state.auth.user?.uuid || '';
+    const pathname = state.router.location ? state.router.location.pathname : '';
+    const match = matchUserProfileRoute(pathname);
+    const uuid = match ? match.params.id : state.auth.user?.uuid || '';
 
-  return {
-    isAdmin: state.auth.user!.isAdmin,
-    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,
-}};
+    return {
+        isAdmin: state.auth.user!.isAdmin,
+        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,
+        userProfileFormMessage: state.auth.config.clusterConfig.Workbench.UserProfileFormMessage,
+    }
+};
 
 const mapDispatchToProps = (dispatch: Dispatch) => ({
     handleContextMenu: (event, resource: UserResource) => dispatch<any>(openUserContextMenu(event, resource)),