X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fuser_management%2Fsrc%2Fdashboard%2FuserMgmtStore.js;h=19742475dd963dc9b4431a6bb1bc4a6123e09bc5;hp=ada70677ee6a34896d9e73134d9dbafc624fc2d0;hb=refs%2Fheads%2Fprojects;hpb=04997f0db765e39bd3a1fa76d40043eda9cdd326 diff --git a/skyquake/plugins/user_management/src/dashboard/userMgmtStore.js b/skyquake/plugins/user_management/src/dashboard/userMgmtStore.js index ada70677e..19742475d 100644 --- a/skyquake/plugins/user_management/src/dashboard/userMgmtStore.js +++ b/skyquake/plugins/user_management/src/dashboard/userMgmtStore.js @@ -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 }) } @@ -122,7 +126,7 @@ export default class UserManagementStore { resetUser() { let username = ''; let domain = 'system'; - let disabled = false; + let disabled = "FALSE"; let platformRoles = { super_admin: false, platform_admin: false,