Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
In the Thingworx Composer it is possible to set permissions at the entity collection level.
I'm looking through the API docs for a way to get an entity collection (e.g. Things, Mashups, etc.) and then set Visibility permissions for an Organization as well as set Designtime and Runtime permissions for User Groups.
Solved! Go to Solution.
Thanks for the reply.
I'm trying to use the SDK, but the article may have pointed me in the direction I need to look.
I'm guessing I should look at CollectionsServices inside com.thingworx.resources.collections
and try to do something such as ...
CollectionsServices collectionsServices = new CollectionsServices();
try {
collectionsServices.AddCollectionVisibilityPermission("Mashups", "MyOrg", "Organization");
Does this look correct to you?
Does this knowledge base article help at all? Are you trying to do this in Javascript or in an SDK?
https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS191141
Thanks for the reply.
I'm trying to use the SDK, but the article may have pointed me in the direction I need to look.
I'm guessing I should look at CollectionsServices inside com.thingworx.resources.collections
and try to do something such as ...
CollectionsServices collectionsServices = new CollectionsServices();
try {
collectionsServices.AddCollectionVisibilityPermission("Mashups", "MyOrg", "Organization");
Does this look correct to you?
Yeah, this looks right to me. Anytime you are using capitalized service calls in the Extension SDK, they will behave the same way that they would within Composer if called on a Thing or from JS.
Hi,
There is a glitch to this. You can set this permissions using the CollectionServices Resource inside a service in Thingworx only for RunTime Permissions and Visibility Permissions, but they don't work for DesignTime Permissions. In order to set the DesignTime Permissions i suggest you make an Thingworx Extension for this(at least this is the way I did it, in order to set design time permissions on collections).
Thanks,
Adrian
Thanks for the feedback. I hadn't considered that there would be a difference. Fortunately this is an enhancement to an existing extension we already have in place so (luckily) setting the designtime permissions worked fine. But this is still good information to have.