Unable to add PropertyRead runtime permission into a new template by programming
‎Sep 06, 2019
04:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Sep 06, 2019
04:13 PM
Unable to add PropertyRead runtime permission into a new template by programming
Hi,
The system complaints that "This entity does not support property permissions"
Exception:
Wrapped java.lang.Exception: This entity does not support property permissions Cause: This entity does not support property permissions
Here under is a code to simulate the case
var EntityServices = Resources['EntityServices'] var newTemplateName = 'TestThingTemplate' if (ThingTemplates[newTemplateName]) EntityServices.DeleteThingTemplate({ name: newTemplateName })
EntityServices.CreateThingTemplate({name: newTemplateName, thingTemplateName: 'RemoteThing' }) ThingTemplates[newTemplateName].AddRunTimePermission({ principalType : "Group", principal : "Users", allow : true, type : "PropertyRead", resource : "*" })
My Bests,
Hung Tran
Solved! Go to Solution.
Labels:
- Labels:
-
Best Practices
-
Coding
-
Examples
ACCEPTED SOLUTION
Accepted Solutions
‎Sep 10, 2019
04:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Sep 10, 2019
04:21 AM
Anyway, the Instance Runtime Permission should be implemented behind the scenes in order to keep the security scheme to be consistent and simple for use.
2 REPLIES 2
‎Sep 06, 2019
04:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Sep 06, 2019
04:25 PM
‎Sep 10, 2019
04:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Sep 10, 2019
04:21 AM
Anyway, the Instance Runtime Permission should be implemented behind the scenes in order to keep the security scheme to be consistent and simple for use.