on 06-01-2016 2:47 PM
Hi,
I'm currently writing a Java application using the SAP BO SDK to modify the user security for various objects on platform (applications, folders, ...). Everything works fine except for removing access from an already existing SecurityPrincipal.
Does someone know how to achieve this?
Thanks & Regards,
Thilo S.
If you want to remove all access to an object for a specific security principal, I believe you have to go to the object itself and then do something like this:
ISecurityInfo2 si2 = obj.getSecurityInfo2();
IExplicitPrincipals ieps = si2.getExplicitPrincipals();
for (int i = ieps.size() - 1; i >=0; i--){
IExplicitPrincipal iep = ieps.get(i);
if (iep.getID() == <SI ID of security principal to be removed>{
ieps.remove(i);
break;
}
}
I'm not sure whether the IExplicitPrincipals index starts at 1 or 0, so you may have to modify accordingly.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Dell, thanks for your reply!
I already tried this approach, but my object only returns one ExplicitPrinciple, which is null. If I try to query the EffectivePrinciples instead, the result contains as many principals as the object shows in CMC. Unfortunately, most of these are also null, except for the groups "Administrators" and "Everyone". And, furthermore, IEffectivePrinciples does not support the method remove(int arg0).
I'm starting to believe that what I'm trying to do is impossible using the SDK...
If you have another idea how to solve this, I would be very thankful!
Thanks and regards,
Thilo S.
What is the version of BO you are using?
Are you looking for removing an access level or a specific right?
Thanks,
Prithvi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.