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

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

List user permissions programmatically in Thingworx 9.7

Bhavya_PC
4-Participant

List user permissions programmatically in Thingworx 9.7

Hi All,
I'm trying to find a way to programmatically list all entity permissions for a specific user or user group in Thingworx 9.7?

I've already searched the PTC community and found these two threads, but they haven't resolved my issue.
Solved: Permisions for users and groups - PTC Community
Solved: Re: List a User's, Group's, or Org's Permissions - PTC Community


The main problem is that the CheckPermissionDataShape is missing in Thingworx 9.7. I attempted to create my own data shape with required fields based on the documentation, but it is not working as expected.
image (2).png
Does anyone know of an alternative method or a workaround to programmatically retrieve a list of all entity permissions for user or user group in Thingworx 9.7? Any guidance would be greatly appreciated!

 

Regards,

Bhavya

 
1 REPLY 1

Hi @Bhavya_PC,

 

"The main problem is that the CheckPermissionDataShape is missing in Thingworx 9.7."

↑ I don't think any thingworx version has an OOTB datashape named "CheckPermissionDataShape"; this is supposed to be a custom datashape.

What fields you wish to output as a result is dependent on your business needs. (If you review the step 2 of the reply: "2. Create a datashape that is used for listing the result of permission")

In the https://community.ptc.com/t5/ThingWorx-Developers/List-a-User-s-Group-s-or-Org-s-Permissions/m-p/732978#M52566 's example, each field (user, entity, PropertyRead etc.)'s value of the result infotable is set in the for loop

 row.user=UserName;
 row.entity=entities[i].name;
 row.PropertyRead = ...;
 row.PropertyWrite = ...;
 row.serviceInvoke = ...;
 row.EventInvoke = ...;
 row.EventSubscribe = ...;

 

Best,

Tony
Announcements


Top Tags