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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to make a policy result in an error when an API is executed by an administrator

SI_10934165
1-Newbie

How to make a policy result in an error when an API is executed by an administrator

I am using Windchill PDMLink Release 11.1 and Datecode with CPS M010 
 

Using the API of "SessionHelper.manager.setAdministrator", you can use "wt.vc.wip.WorkInProgressHelper.service.undoCheckout", "ChangeHelper2.service.unattachChangeable", " VersionControlHelper.service.deleteIterations" API is executed, \nI would like to get an error if I set the permission to "Deny" in policy management, but it does not result in an error. \nCan I change the policy management so that it fails?

-------------------------------------------

Translated text from Japanese to English using PTC translate tool

Body: SessionHelper.manager.setAdministrator」のAPIを使い管理者にて、「wt.vc.wip.WorkInProgressHelper.service.undoCheckout」「ChangeHelper2.service.unattachChangeable」、「VersionControlHelper.service.deleteIterations」のAPIを実行させた際に、 
ポリシー管理で権限を「拒否」にすればエラーとなるようにしたいのですが、エラーになりません。 
ポリシー管理を変更して、エラーにする方法をできますか?

--By Community Moderation Team

-------------------------------------------

2 REPLIES 2

Hi @SI_10934165 

Some methods check the ACL some not. 

If you write onw code, then you should check if the user has a permission and stop the operation . Does not matter if he is admin or not.

It applies also for the session where is Administrator set by method setAdministrator. 

PetrH

Hello @SI_10934165

 

It looks like you have a response from a community member. If it helped to answer your question please mark the reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

Top Tags