on 08-22-2008 5:12 AM
Hi all,
I have an WD application.
I need to add authroziations to the WD applicatinon.
E.G : I deployed the application in the portal. Based on user roles and authorization the different views should be shown.
If an administrator has logged on , he can view and modify the data in the WD.
If a normal user logged on , he can only view.
Please let me know how to go about this.
Regards,
Hi,
For this first you need to create portal iViews and pages for your WD applications. Then create worksets based on the number of different types of users. In each worksets you can add only those pages which are required by a particular type of user.
Then create roles and assign the workset to the role so that a particular role will have access to only those workset which are assigned to the role.
Then create users and assign roles to them.
Hope it helps.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the helpful answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you want to apply Authentication to your web dynpro application one way is to :-
1) Double click on the Appln
2) On the right hand side there will be two tabs "Properties" and "Application Properties"
3) Go to Application properties and click on "New"
4) Select pre-defined and then Browse the Name and select Authentication
5) Select the Value as True
Finish and the authentication is applicable to your appln.
The Users having access can only see the application
Thnx!
Harry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To reach your functionality you have to follow the below steps
1. Open the application properties and set the Authentication to true (Your Project -> Web Dynpro -> Applications -> Your Application -> Application Properties - > New -> Browse -> Authentication)
2. Get the logged in user in controller
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
3. Check whether this user has required role/group or not
sapUser.isMemberOfRole("unique id of role",true);
or
sapUser.isMemberOfGroup("GRUP.PRIVATE_DATASOURCE.un:MyGroup",true);
4. Create the context attribute (ex: modButtonVisible) and set the type to com.sap.ide.webdynpro.uielementdefinitions.Visibility
5. Bind this attribute to button property "visible"
6. In init method after checking above 3 point set the visibility for the context attribute
wdContext.currentContextElement().setModButtonVisible(WDVisibility.VISIBLE);
or
wdContext.currentContextElement().setModButtonVisible(WDVisibility.NONE);
Hope this will solve your problem
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Check this Link :-
this tutorial describes using UME permissions to Protect Access and Provide Authorization.
You can Also do the Following.
From Webdynpro Runtime you can Get the logged in portal your and from Logged in Portal user you can get its role and Groups and according to it you can implement your requirement.
IWDClientUser user = WDClientUser.getLoggedInClientUser();
Iuser puser = user.getSAPUser();
from puser you can extract its roles and identify its groups
Siddharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Somya
1) First Create two String variables
public static final String APP_TEST_ENTRY = "TestEntry";
public static final String APP_TEST_APPROVAL = "TestApproval";
create one Boolean value attributes in the component controller
setIsEntryView()
2) In the DoInit
String appName = wdComponentAPI.getApplication().getName();
if (TestCompController.APP_TEST_ENTRY.equals(appName)) {
wdContext.currentContextElement().setIsEntryView(true);
} else if (TimesheetEntry.APP_TEST_APPROVAL.equals(appName)) {
wdContext.currentContextElement().setIsEmpView(false);
}
this is one of the way to handle
Best Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi<
heres the pdf to add security features to web dynpro
Steps to Create a Simple WebDynpro Application Which Requires Authentication into Portal Before Itu2019s Accessed
This pdf misses out one thing addition of the jar files required
here are the steps
You need to add the jar files com.sap.security.api.jar. and com.sap.security.api.perm.jar.
We add these files by Right clicking on the project. Select Properties.Select Java Build Path.
Then Press the button Add External Java files and browse to the location of these files.After adding both the jar files click on OK.
this will surely help u.
Edited by: Nikhil Tapkir on Aug 22, 2008 9:11 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.