on 10-17-2012 12:39 PM
Hello Friends.
I am currently developing an application using web dynpro java on (NWDS 7.0 ehp1) to get the KM resources & collection of a user with the permission type (i,e. Read/Write/Full Controll etc) and display it on a table.
So I am able to get the name of the Resources & Collections of a user but I am unable to get the permission type.
Im not getting any help fom anywhere else. So can anyone please suggest me the way or example of code to get that.
Thanks
Mainak
Mainak
To get the permissions, you will have to use the ACL Manager , ACL Entry APIs provided by the RF framework.
For a resource, you get the aclmanager and resourceacl...from there, you can get the ACL entries.
A sample code could be
ISecurityManager sm = resource.getRepositoryManager().getSecurityManager(resource);
if (sm != null && sm instanceof IAclSecurityManager) {
IAclSecurityManager asm = (IAclSecurityManager) sm;
IResourceAclManager ram = asm.getAclManager();
IResourceAcl ra = ram.getAcl(resource);
if (ra == null) {
ra = ram.getInheritedAcl(resource);
}
IResourceAclEntryListIterator aclList = ra.getEntries().iterator();
Check the javadocs apis as well
Sandip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.