Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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.
Solved! Go to Solution.
Hi,
To solve this we wrote a validator and defined the roles these itself. It worked.
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:
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.
Lori,
I tried using the solution you gave but still, i did not get the solution. Have look at these screenshots.
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.
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. 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.
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.
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?
Hi Lori,
Attaching the screenshot here.
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.
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.
Hi,
To solve this we wrote a validator and defined the roles these itself. It worked.