SetEntityPermission removes existing UserGroup permissions
Jul 08, 2024
04:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jul 08, 2024
04:39 AM
SetEntityPermission removes existing UserGroup permissions
Hi Community,
I'm trying to set RunTimePermission for project entities using below code
let params = {
allow: true /* BOOLEAN {"defaultValue":true} */,
name: "UG2" /* STRING */,
includeDependents: false /* BOOLEAN {"defaultValue":false} */,
type: "Group" /* STRING */,
projectName: "TestProject" /* PROJECTNAME */,
tags: undefined /* TAGS */
};
// no return
Resources["EntityServices"].SetEntityPermission(params);
When we execute this service it removes existing UserGroup permission from entity.
Is this a bug or I'm doing something wrong here.
TWX Version : 9.4.1
/VR
Solved! Go to Solution.
Labels:
- Labels:
-
Best Practices
-
Coding
-
Troubleshooting
ACCEPTED SOLUTION
Accepted Solutions
Jul 08, 2024
05:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jul 08, 2024
05:48 AM
have you checked using AddResourceEntityPermission instead?
3 REPLIES 3
Jul 08, 2024
05:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jul 08, 2024
05:48 AM
have you checked using AddResourceEntityPermission instead?
Jul 08, 2024
06:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jul 08, 2024
07:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jul 08, 2024
07:13 AM
Does that solve the issue for you? I mean SetEntityPermission expects all permissions to be included in the parameters and overrides existing values. To set individual privileges, use the Add and Delete services. You could create a case for clarification though.
