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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

SetEntityPermission removes existing UserGroup permissions

Velkumar
18-Opal

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

1 ACCEPTED SOLUTION

Accepted Solutions
Rocko
17-Peridot
(To:Velkumar)

have you checked using AddResourceEntityPermission instead?

View solution in original post

3 REPLIES 3
Rocko
17-Peridot
(To:Velkumar)

have you checked using AddResourceEntityPermission instead?

Hi @Rocko 

 

AddResourceEntityPermission works properly. 

 

/VR

Rocko
17-Peridot
(To:Velkumar)

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.

Top Tags