on 08-23-2005 2:05 AM
Does any body knows how can i assign permision to a folder with a java program? I developed a program that create a folder but need assign it permisions.
Hi. Prakash Singh.
In the example code: For a user you would do the following, how can i assign a different user than the logon user ?
Best Regards
Ali Cruz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prakash,
I am on netweaver 2004 sp17 and I added your code to get ep5 user for the km application but I am getting error for the second line of code when using WPUMFactory
1) IUser myUser = UMFactory.getUserFactory().getUserByLogonID("JoseAli");
2) <b>com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getEP5User(myUser);</b>
do we need to change anything in portalpp.xml to make the WPUMFactory working? Pease let me know.
thanks in advance.
Hi Sanketh,
I m also facing the same problem
com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getEP5User(myUser);
getting NullPointerException in this statement.
If ur problems have got solved than please do guide me how did u get it solved.
Im in great need of ur help.
Please help me out.
@Pankaj:
Did you maintain the web dynpro references? If not, this may help: select your wd project folder, and got to properties. Select Web Dynpro References and then Tab Sharing references. Add PORTAL:sap.com/com.sap.km.application.
Best regards
Iris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jose,
For a group you would do the following.
IResource resource = ResourceFactory.getInstance().getResource(rid, ctxt);
IResourceAclManager aclmanager = aclsecurityManager.getAclManager();
IResourceAcl racl = aclmanager.createAcl(resource);
IUMPrincipal everyone = WPUMFactory.getGroupFactory().getGroup("Everyone");
racl.addEntry(aclmanager.createAclEntry(everyone, false, aclmanager.getPermission(IAclPermission.ACL_PERMISSION_READ), 0));
For a user you would do the following.
IResource resource = ResourceFactory.getInstance().getResource(rid, ctxt);
IResourceAclManager aclmanager = aclsecurityManager.getAclManager();
IResourceAcl racl = aclmanager.createAcl(resource);
com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getEP5User(request.getUser());
racl.addEntry(aclmanager.createAclEntry(user, false, aclmanager.getPermission(IAclPermission.ACL_PERMISSION_READ), 0));
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.