cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Organisation & UserGroups

AP_9587236
17-Peridot

Organisation & UserGroups

In an organization, 3 organizational units were created. All units having individual UserGroups.
The users in one UserGroup should not be added to another UserGroup. How to achieve this?

4 REPLIES 4
sbt
15-Moonstone
15-Moonstone
(To:AP_9587236)

Users["username"].GetGroups() will give you a list of groups that the user belongs. use the list to validate and add accordingly.

AP_9587236
17-Peridot
(To:sbt)

You suggesting to write custom service for the organisational units of same organisation?

sbt
15-Moonstone
15-Moonstone
(To:AP_9587236)

Organization drives your visibility and user group drivers your permissions on the entities.

Considering the use case that a user from one organization should not be added to another , Thingworx do not have internal restrictions by itself.

But i am not sure exactly what is the final target. But yes you have to manage through services.

Also you can use below services to check if the user exist in the unit.
var params = {
name: "unitname" /* STRING */,
member: "username" /* STRING */
};

// result: INFOTABLE dataShape: EntityReferenceWithDescription
var result = Organizations["TestOrganization"].GetMember(params);

 

var params = {
name: "unitname" /* STRING */
};

// result: INFOTABLE dataShape: EntityReferenceWithDescription
var result = Organizations["TestOrganization"].GetMembers(params);

slangley
23-Emerald II
(To:AP_9587236)

Hi @AP_9587236

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Announcements


Top Tags