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

Changing Access rights through setRoleAdHocAcl

Highlighted
Newbie

Changing Access rights through setRoleAdHocAcl

Hi !

I've got a couple of questions regarding setting ProjectLink access rights.

So I'm developing a customizations for windchill 10.1 which attempts to set ProjectLink access rights via a workflow/route. The method which is used is setRoleAdHocAcl(ContainerTeamManaged container, AdHocControlled per, Vector perms, String roleName) found in inf.team.ContainerTeamHelper .

The following information is given in the supported javadoc:

Set the ad-hoc access rights for a given role in the container's team. To remove all the ad-hoc access rights granted by the ProjectLink access ui or by this method previously, pass it an empty Vector of permissions. The object is returned after is has been saved.

I have no problems removing access rights. But when I try to set an access right I get a java.lang.UnsupportedOperationException ...

The following illustrates what I want to do :

Vector vec = new Vector(1);

vec.add(wt.access.AccessPermission.READ);

ContainerTeamHelper.service.setRoleAdHocAcl(container, (AdHocControlled)part, vec, "Designer");

While there certainly could be something wrong with the code I have written it seems more likely that there is something else that's causing the exception, based on the fact that I'm able to remove access rights ..

So are there any initial conditions which must be met in order for me to set access rights in this way?

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________ Check out the Windchill Tips Board! We're talking about Whirlpool's use of digital twin, augmented reality, and data-driven design!

The NAVIGATE WORKING GROUP is here! Come innovate with PTC!

Sign up for a Working Group