Quantcast
Channel: SCN: Message List - SAP NetWeaver Technology Platform
Viewing all articles
Browse latest Browse all 4415

Creating Actions for Roles using apis from com.sap.security.api

$
0
0

Hi,

 

I have created a Role using

   IRoleFactory roleFactory = UMFactory.getRoleFactory();
   IRole newRole = roleFactory.newRole(uniqueName);
   newRole.save();
   newRole.commit();

 

This is visible on the NW administrator console.

 

Now i want to add some Actions to this Role.

Using the following.

 

         IPrincipalMaint principalMaint = principalFactory.getMutablePrincipal(newRole.getUniqueID());

   principalMaint.setAttribute("com.sap.security.role", "actions", {"SomeAction"});
   principalMaint.save();
   principalMaint.commit();

 

This adds the attribute to the Role. But it doesnt come as Action when viewed in the Action TAB on the Role Page of the NW web administrator page.

 

Is the API used for creating Role different from creating and setting Attributes?

 

 

-Dixit


Viewing all articles
Browse latest Browse all 4415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>