diff options
author | sebdet <sebastien.determe@intl.att.com> | 2020-02-23 09:31:04 -0800 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2020-02-25 06:49:46 -0800 |
commit | 7658007d67c5c2bc1d81bff4bf972b315cb5bea6 (patch) | |
tree | e44324c6dd8a1d653a59d3458a5c38116f25b86a /ui-react/src/components/dialogs/UserInfoModal.test.js | |
parent | aa486be66b1c29ad2e953cb44d105ca1bde40b1c (diff) |
Simplify the user management
Simplify the user management and fix a bug in the server, crashing when no user are logged and an operation is requested, and also previous user still stored in the securitycontext when admin is logged (due to static variable)
Issue-ID: CLAMP-651
Change-Id: I57523bc2c3afaf5ca5a3acf5c59823df06fd4cd9
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/components/dialogs/UserInfoModal.test.js')
-rw-r--r-- | ui-react/src/components/dialogs/UserInfoModal.test.js | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/ui-react/src/components/dialogs/UserInfoModal.test.js b/ui-react/src/components/dialogs/UserInfoModal.test.js index b5a2b272e..f5ed0ae10 100644 --- a/ui-react/src/components/dialogs/UserInfoModal.test.js +++ b/ui-react/src/components/dialogs/UserInfoModal.test.js @@ -46,12 +46,7 @@ describe('Verify UserInfoModal', () => { component.setState({ userInfo: { "userName": "test", "cldsVersion": "1.0.0", - "permissionReadCl": true, - "permissionReadTemplate" : true, - "permissionReadTosca" : true, - "permissionUpdateTemplate" : true, - "permissionUpdateCl" : true, - "permissionUpdateTosca": true + "allPermissions": ["permission1","permission2"] }}); expect(component).toMatchSnapshot(); }); @@ -69,18 +64,15 @@ describe('Verify UserInfoModal', () => { component.setState({ userInfo: { "userName": "test", "cldsVersion": "1.0.0", - "permissionReadCl": true, - "permissionReadTemplate" : true, - "permissionReadTosca" : true + "allPermissions": ["permission1","permission2"] }}); - expect(component.find('FormControl').length).toEqual(5); + expect(component.find('FormControl').length).toEqual(4); const forms = component.find('FormControl'); expect(forms.get(0).props.defaultValue).toEqual("test"); expect(forms.get(1).props.defaultValue).toEqual("1.0.0"); - expect(forms.get(2).props.defaultValue).toEqual("Read Template"); - expect(forms.get(3).props.defaultValue).toEqual("Read Model"); - expect(forms.get(4).props.defaultValue).toEqual("Read Tosca"); + expect(forms.get(2).props.defaultValue).toEqual("permission1"); + expect(forms.get(3).props.defaultValue).toEqual("permission2"); }); }); |