Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

API to add Actions to Role

Former Member
0 Kudos

Hi,

This is in reference to com.sap.security.api.

I am looking for a way to add Actions to Role.

Tried the following:

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

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

principalMaint.save();

principalMaint.commit();

Is the way correct or am i missing something?

There are Factory for IRole, IGroup, IUser. What is the better way to get a handle for Actions and bind it to Roles?

Regards

Dixit

1 REPLY 1

MichaelShea
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dixit,

Here is the documentation I co-wrote about modifying roles. (I am not a programmer .) Does this help you?

Editing Role Attributes - Integrating Security Functions - SAP Library