ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

SetEntityPermission removes existing UserGroup permissions

Velkumar
19-Tanzanite

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

ACCEPTED SOLUTION

Accepted Solutions

have you checked using AddResourceEntityPermission instead?

View solution in original post

3 REPLIES 3

have you checked using AddResourceEntityPermission instead?

Velkumar
19-Tanzanite
(To:Rocko)

Hi @Rocko 

 

AddResourceEntityPermission works properly. 

 

/VR

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.

Announcements


Top Tags