Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi,
I added a user to a System User group e.g Designer.
When I try to edit the system user group to remove the user, I am not able to save the setting for this user group.
I get this message that entity cannot be edited.
Is this a bug ..?
My ThingWorx version is 7.0.1-b842.
Thanks.
Are you clicking on Edit or Edit Members? Edit should be blocked for System objects.
When I do Edit member for System user group and remove the user, the user seems to be removed from the Edit member UI.
But when I try to get the user groups for the user using sessionInfo object's GetCurrentUserGroups()
SessionInfo sessionInfo = (SessionInfo) EntityUtilities.findEntity("CurrentSessionInfo",
ThingworxRelationshipTypes.Resource);
I still continue to get the Designer user group as the one of the user groups fo rthe logged in user. Even if the user was removed from the Designer's user group.
for non system user group, this does not seem to be an issue.GetCurrentUserGroups() gives the correct group.
Manisha, that looks to be a bug. I'll check internally and let you know.
Hi Ravi,
Were you able to confirm this..
-Manisha
Manisha, does a system (Tomcat) restart clear the groups or does it still persist?
Hi Ravi,
System(Tomcat) restart does not clear the groups..
-Manisha
I rechecked, and was not able to reproduce your issue. Please try this –
1. Add your user (TestUser) to the Designers Group
2. Add a service called getGroups to a new Thing
3. Use this in the script section, with output set to Infotable –
// result: INFOTABLE dataShape: EntityList
var result = Users["TestUser"].GetGroups();
4. Run the service – the output should give you an Infotable with 2 rows – Users and Designers
5. Go to the Designers Group and remove the user
6. Re-run the service – you should only see 1 row with Users on it
Hi,
In my extension code, the groups for the logged in user are fetched in this way..
SessionInfo sessionInfo = (SessionInfo) EntityUtilities.findEntity("CurrentSessionInfo",
ThingworxRelationshipTypes.Resource);
InfoTable roles = sessionInfo.GetCurrentUserGroups() ;
So even if the UI and java script service shows that the user is removed from the groups, but the session object does not seems to be getting updated with correct user groups.
Thanks
Manisha