cancel
Showing results for 
Search instead for 
Did you mean: 

IUser problem with com.sapportals.portal.security.usermanagement

PaulHodgdon
Participant
0 Kudos

I am trying to get the current user so I have written

IUser user = request.getUser();

I have imported com.sap.security.api.*;

The compiler insists I need com.sapportals.portal.security.usermanagement.IUser

I thought that version was deprecated or at least not the preferred method?

It keeps saying my classpath is incomplete. Why can't it use the IUser from the com.sap.security.api?

Any help would be greatly appreciated.

Thanks

Paul

Accepted Solutions (0)

Answers (1)

Answers (1)

PaulHodgdon
Participant
0 Kudos

Update

The offending line appears to be IResourceContext myContext = new ResourceContext(user);

when this line is added it causes the above error which I can only assume is because ResourceContext(user) accepts a different kind of user object. does anyone know if there is another way to do this? Here is the rest of the code to see where i am headed:

IUser user = req.getUser();

RID rid = RID.getRID("/temp");

IResourceFactory factory = ResourceFactory.getInstance();

IUserFactory uf = UMFactory.getUserFactory();

IResourceContext myContext = new ResourceContext(user); //this is the line causing the problems.

IResource resource = factory.getResource(rid, myContext);

if(resource.isCollection())

{

ICollection collection = (ICollection)resource;

IResourceList children = collection.getChildren();

Iterator i = children.listIterator();

}

the point is i am trying to get the ACL permissions on the children of the rid

Former Member
0 Kudos

hi there

if you were able to find applicaiton can u share the solution, i too am facing similar problem

thank in advance

bye

former_member182374
Active Contributor
0 Kudos

Hi Paul,

There is no another way to do it.

For accessing KM resources you need the "old" IUser object (although it's deprecated).

The package name is: com.sapportals.portal.security.usermanagement

and the jar name is com.sap.security.api.ep5.jar

Regards,

Omri