Added projects to user management
[osm/UI.git] / skyquake / plugins / user_management / src / dashboard / userMgmtStore.js
index 9654b4a..1974247 100644 (file)
@@ -29,7 +29,9 @@ export default class UserManagementStore {
         this.isReadOnly = true;
         this.userOpen = false;
         this.hideColumns = false;
+        //There is probably a better way of handling the view/edit/readonly matrix conditions for some of these inputs. Should definitely revist
         this.isEdit = false;
+        this.isEditUser = false;
         // this.exportPublicMethods({})
     }
     /**
@@ -72,6 +74,7 @@ export default class UserManagementStore {
             platformRoles: user.platformRoles || this.platformRoles,
             disabled: user.hasOwnProperty('disabled').toString().toUpperCase(),
             projectRoles: user.projectRoles || this.projectRoles,
+            projects: user.projects,
             currentPassword: user.password
         }
         let state = _.merge({
@@ -84,6 +87,7 @@ export default class UserManagementStore {
     }
     editUser(isEdit) {
         this.setState({
+            isEditUser: !isEdit,
             isReadOnly: isEdit
         })
     }