Skip to main content
10-Marble
January 7, 2025
Solved

Delete ACL applies to all except participant by delete acl utility.java

  • January 7, 2025
  • 2 replies
  • 2444 views

Version: Windchill 12.0

 

Use Case: Delete the ACL in domain by using Utility by running windchill command in shell


Description:

Hi,

we had a utility for deleting ACL, we are using this for deleting ACL from backend in various domains.

that utility is deleting Group assigned ACL and Role assigned ACL, but it is not deleting ACL which is group assigned ACL applies to "All except participant" principal.

 

when we tried to run ACL delete utility, it is returning error for above applies to "All except participant". error message is "Resource bundle/Message key = wt.access.accessResource/38".

I need a suggestion on this to how to solve this and how can i change or implement the logic to delete the ACL which is applies to "all except participant" and have absolute deny permission sets by this utility.
Used API is: 

AccessControlHelper.manager.deleteAccessControlRule(localAdminDomainRef, objType, localState,

localWTPrincipalReference, false);

getting logs from my delete utility where it fails:

deleteACL
ALL Parrameters :wt.fc.WTObject
sLCState: ALL
localState :null
localWTContainerRef :Common_Startmodels
localAdminDomainRef :Hairpins
Get Internal Role or Group Name
groupForName = EPT Startmodels Hairpins SF Pool Grp
localWTPrincipalReference :EPT Startmodels Hairpins SF Pool Grp
ERROR: Couldn't find rule! Message:  Resource bundle/Message key = wt.access.accessResource/38
Best answer by Akash.S_121

I got the usage of API of this delete AccessControlRule:

AccessControlHelper.manager.deleteAccessControlRule(localAdminDomainRef, objType, localState,

localWTPrincipalReference, false);

here in above false represents allExceptprincipal is false.

for deleting all except participant ACL, we need to use true in place of false

AccessControlHelper.manager.deleteAccessControlRule(localAdminDomainRef, objType, localState,

localWTPrincipalReference, true);

but for this, i need to get the ACL, if it had allExceptPrincipal is true or false, as per this, we need specific logic to use above API.

AccessControlHelper.manager.getAccessControlRule(localAdminDomainRef, objType, localState,

localWTPrincipalReference, boolean)

 

 

 

2 replies

avillanueva
23-Emerald I
23-Emerald I
January 7, 2025

Are you using the GUI or a command line to do the deletion? How many ACL lines in total do you have to delete?

10-Marble
January 7, 2025

by command line. 
in windchill shell, we are using "windchill ext.org.utility.ACLUtility <adminusername> <adminpassword> <inputfilelocationpath>
like this and all the loggers, i am using csv to append in java it will give me the csv with logs in windchill temp location.
whatever above you seen the table, that are from CSV output of utility.

avillanueva
23-Emerald I
23-Emerald I
January 7, 2025

It seems to be saying that it cannot find the ACL. If there are not too many and you think its a glitch with the utility, is manual deletion possible via the GUI?

Akash.S_12110-MarbleAuthorAnswer
10-Marble
January 15, 2025

I got the usage of API of this delete AccessControlRule:

AccessControlHelper.manager.deleteAccessControlRule(localAdminDomainRef, objType, localState,

localWTPrincipalReference, false);

here in above false represents allExceptprincipal is false.

for deleting all except participant ACL, we need to use true in place of false

AccessControlHelper.manager.deleteAccessControlRule(localAdminDomainRef, objType, localState,

localWTPrincipalReference, true);

but for this, i need to get the ACL, if it had allExceptPrincipal is true or false, as per this, we need specific logic to use above API.

AccessControlHelper.manager.getAccessControlRule(localAdminDomainRef, objType, localState,

localWTPrincipalReference, boolean)