on 06-25-2008 12:51 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.