on 2012 Feb 09 9:44 AM
Hi Experts,
I'm trying to create a new ACLEntry using 7.30. My code is :
IResource resource = ResourceFactory.getInstance().getResource(originalRidFile, context);
ISecurityManager securityManager = resource.getRepositoryManager().getSecurityManager(resource);
IResourceAclManager acmManager = ((IAclSecurityManager)securityManager).getAclManager();
IAclPermission permission = getPermission();
IPrincipal principal = getPrincipalUME();
acmManager.createAclEntry((IUMPrincipal)principal, false, permission, 0);
But here I need to set a dependeny to my development component to another component which contains IUMPrincipal. I tried without casting acmManager.createAclEntry(principal, false, permission, 0); but an error occured that this code is referencing to IUMPrincipal: "The type com.sapportals.portal.security.usermanagement.IUMPrincipal cannot be resolved. It is indirectly referenced from required .class files"
I tried to add com.sap.portal.usermanagement as dependency but it can not be done because "grand list does not allow references". Which is the right component in the development infrastructure that should be added as a new dependency.
Edited by: Teodor Tanev on Feb 9, 2012 10:44 AM
Edited by: Teodor Tanev on Feb 9, 2012 10:49 AM
Hi Teodor,
Check out http://help.sap.com/javadocs/NW73/SPS05/KMC/com/sapportals/wcm/util/acl/IAclManager.html
There you'll see that the with 7.3 (finally) the old principal implementations (com.sapportals.portal.security.usermanagement... from EP5) are deprecated. With 7.3, you can and should use the standard UME objects (com.sap.security.api...)
> I tried without casting acmManager.createAclEntry(principal, false, permission, 0); but an error occured that this code is
> referencing to IUMPrincipal: "The type com.sapportals.portal.security.usermanagement.IUMPrincipal cannot be resolved. It is
> indirectly referenced from required .class files"
The approach is right (no casting to not use a deprecated method); the indirect reference is annoying, but tell this SAP... ;-|
Anyhow, you'll need tc/epbc/ume/ep5/deprecated from EP-BASIS - as the name says, yeah, it is deprecated, but needed. SAP just got half the way to eliminate old deprecated EP5 stuff from it's APIs... 😐
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
11 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.