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

We are happy to announce the new Windchill Customization board! Learn more.

Disable the import plan option in product manager profile

prathi
1-Newbie

Disable the import plan option in product manager profile

I have to disable the option of Import Plan for a particular role/user in a Project created by me.  I tried doing it using Policy Administration, but could not do it. Please let me know how to do.

1 ACCEPTED SOLUTION

Accepted Solutions
prathi
1-Newbie
(To:prathi)

Hi,

To solve this we wrote a validator and defined the roles these itself. It worked. 

View solution in original post

12 REPLIES 12
LoriSood
22-Sapphire II
(To:prathi)

Prasad,

I took a look at the validator code used to determine if Import Plan should be enabled in the menu. It checks whether or not the user has Modify permission in the Project's /System domain on the Plan object. I created the following permission on my system and it disabled the action for that user:

3-9-2016 9-46-17 AM.jpg

3-9-2016 9-47-52 AM.jpg

You can use a regular Deny, rather than an Absolute Deny, on the Modify permisssion, too. I just used Absolute Deny for testing to make sure that it would definitely get applied.

prathi
1-Newbie
(To:prathi)

Lori,

I tried using the solution you gave but still, i did not get the solution. Have look at these screenshots.P1.PNGP2.PNGP3.PNGP4.PNG

I tried Giving Deny/Absolutely Deny to Modify only but it did not worked, then i did same for all permissions except Read, doing this disabled all options which were disabled for you except Import Plan. Please check let me know if there is any mistake in what i did.

LoriSood
22-Sapphire II
(To:prathi)

Prasad,

Can you enable access control logging and post the log for this:

1. As site admin user go to Site > Utilities > Server Status > Monitoring Tools > Log Levels

2. Right before you are ready to load the plan page as the demo user set the wt.access logger level to ALL

3-10-2016 10-04-36 AM.jpg

3. As the demo user load the project plan page and display the menu

4. As the site admin user set the logger level back to ERROR on the Log Level page.

5. Collect the Method Server log and attach it here.

Hi,

As required by you I have attached the Log and the Screenshot. I have tried it for a different role (Team Member) and different user (Test 3). I have made the necessary changes in ACL.

Screenshot (302).png

BhushanNehe
14-Alexandrite
(To:prathi)

Hi Prasad,

The validator is little different in 10.2 as compared to earlier releases. Can you please confirm what Windchill release you are on.

Regards,

Bhushan

Hi Bhushan,

I am working upon Windchill 10.2 M030.P5.PNG

LoriSood
22-Sapphire II
(To:prathi)

Prasad,

Can you add &jcaDebug=1 to the end of the URL on the Project Plan page and then send a screenshot of what the Action menu looks like?

3-11-2016 9-53-35 AM.jpg

Hi Lori,

Attaching the screenshot here.P6.PNG

LoriSood
22-Sapphire II
(To:prathi)

Prasad,

It doesn't look like you're using the validator that is normally used OOTB. I looked at both 10.1 and 10.2 code and I cannot find that these versions use the validator listed in your screenshot (DefaultUIComponentValidator) for this action.

This is what my <WT_HOME>/codebase/com/ptc/projectmanagement/projectmanagement.service.properties looks like:

      <Option cardinality="singleton" requestor="null" serviceClass="com.ptc.projectmanagement.plan.validators.ImportMSPPlanActionValidator" selector="import_msp_plan" />

Subsequently, my <WT_HOME>/codebase/service.properties looks like this:

wt.services/svc/default/com.ptc.core.ui.validation.UIComponentValidator/import_msp_plan/null/0=com.ptc.projectmanagement.plan.validators.ImportMSPPlanActionValidator/singleton

Take a look at your system and see which validator is specified in these places. You may need to investigate why the OOTB one is not used. If there is no good reason why it's not, you can try updating the projectmanagement.service.properties to use the ImportMSPPlanActionValidator and then running xconfmanager -p in a windchill shell to get the service.properties updated. The Method Server will need to be restarted to complete the changes.

Hi Lory,

I checked how

my <WT_HOME>/codebase/com/ptc/projectmanagement/projectmanagement.service.properties looks like, it looks the same as your i.e. it has

<Option cardinality="singleton" requestor="null" serviceClass="com.ptc.projectmanagement.plan.validators.ImportMSPPlanActionValidator" selector="import_msp_plan" />

However I also checked how my <WT_HOME>/codebase/service.properties looks like, but it does not has

wt.services/svc/default/com.ptc.core.ui.validation.UIComponentValidator/import_msp_plan/null/0=com.ptc.projectmanagement.plan.validators.ImportMSPPlanActionValidator/singleton

So should I manually add it into service.properties? Is this recommended.

And I have not made any changes in my Windchill,  by default it has been taking this validator.

LoriSood
22-Sapphire II
(To:prathi)

For the sake of testing you should be able to add the line into service.properties and restart Method Server. See if it picks up the validator after that, and whether it will disable the menu action then.

prathi
1-Newbie
(To:prathi)

Hi,

To solve this we wrote a validator and defined the roles these itself. It worked. 

Top Tags