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

How to add ACL using API

Highlighted
Visitor

How to add ACL using API

Hello,

I have a requirement of providing modify access on an IBA of CustomConfigurableMastersLink (subtype of ConfigurableMastersLink).

I tried using AccessControlHelper API but got stuck in the parameters which it takes for creating new ACL.

AccessControlHelper.manager.createAccessControlRule(AdminDomainRef arg0, String arg1, State arg2, WTPrincipalReference arg3, AccessPermissionSet arg4, AccessPermissionSet arg5) throws WTException

Can someone please guide me with the parameters. Or with some alternate solution to give ACL using API.

Appreciate your help. 

Thank You.

Regards,

Manisha

Tags (1)
3 REPLIES 3

Re: How to add ACL using API

It's not that easy! I needed a long time to figure it out, but I will provide it what I found out.

arg1 = AdminDomainRef adminDomainRef

AdministrativeDomain localAdministrativeDomain = AdministrativeDomainHelper.manager.getDomain(sDomain, localWTContainerRef);

adminDomainRef = (AdminDomainRef) (new ReferenceFactory()).getReference(localAdministrativeDomain);

arg2 = String objectType

arg3 = State lcState

arg4 = WTPrincipalReference wtPrincipalReference

arg5 = boolean false (Set default to false)

arg6 = AccessPermissionSet accessPermissionSetGrant

accessPermissionSetGrant.add(AccessPermission.ALL);

arg7 = AccessPermissionSet accessPermissionSetDeny

accessPermissionSetDeny.add(AccessPermission.ALL);

arg8 = AccessPermissionSet accessPermissionSetAbsolutDeny

accessPermissionSetAbsolutDeny.add(AccessPermission.ALL);

Call

AccessControlHelper.manager.createAccessControlRule(adminDomainRef, objectType, lcState, wtPrincipalReference, false, accessPermissionSetGrant, accessPermissionSetDeny, accessPermissionSetAbsolutDeny);

Hope that will help you

Re: How to add ACL using API

Thanks a lot Bjorn. This really helped !!

Just have one question, what does "sDomain" stands for in getDomain parameter..??

Re: How to add ACL using API

‌sDomain is the domain on the policy manager. This is most of the time /default or could be /default/pdm