cancel
Showing results for 
Search instead for 
Did you mean: 

Role based Access to WebDynPro

Former Member
0 Kudos

Hi All,

I have created a set of web dynpro applications.

Now I want to assign these to users based on their respective roles.How can i achieve this, is the use of Enterprise portal a must in this case??

cheers

Anand

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

yes you have to use enterprise portal for that.

you have convert the webdynpro application to the enterprise portal iviews and you have to create roles and users and assign the users to the roles.the folowing link may be useful

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b38ff3ee-0201-0010-b9ba-dbb...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2f72d990-0201-0010-85b0-8d6...

regards

saravana

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Anand,

Capture the roles in webdynrpo using the portal runtime APIs

IUser user = request.getUser();

Iterator roles_itr = user.getRoles(true);

while (roles_itr.hasNext())

{

try

{

String uniqueID = roles_itr.next().toString();

IRole userRole = UMFactory.getRoleFactory().getRole(uniqueID);

if(userRole.getDisplayName().equalsIgnoreCase("<role name>"))

{

you can make the manipulations here

}

}

catch (Exception e)

{

}

You can embed the views in a view set and fire the views according to the roles

You can also play with visibility.

Attach the visibility property of the UI elements to an attribute having type visibility and change it accordingly

Hope this helps you

Regards

Rohit

Former Member
0 Kudos

I'm facing the same kind of problem. And I have no idea

about How to get the request in the Web Dynpro application from the EP. Thanks for your detailed explanation.

Message was edited by: Robin Chu

arun_srinivasan
Contributor
0 Kudos

hi anand,

check this weblog too "User management API in WebDynpro"

/people/sap.user72/blog/2005/06/05/user-management-api-in-webdynpro

hope this helps,

Regards,

Arun

arun_srinivasan
Contributor
0 Kudos