cancel
Showing results for 
Search instead for 
Did you mean: 

Display KM Resources in a table with Permission type

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

SandipAgarwalla
Active Contributor
0 Kudos

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

http://help.sap.com/javadocs/NW04S/current/km/com/sapportals/wcm/repository/security/IResourceAclMan...

Sandip

Former Member
0 Kudos

Thanks for your quick response Sandip. I'll try it.

Former Member
0 Kudos

Hi Sandip,

I have done the coding part but when I am going to get that I am not getting any option for permission.

Lik my code is :

resourcesUserElement.setPermissionType(tempResources.get****** "Here I am not getting any appropriate option for permission").

Can u please suggest me ?

Answers (0)