on 06-09-2008 10:36 AM
hi all,
Can anyone give me an idea on how to implement role based authentication in WDABAP?if possible with an example
Thanks in advance,
Regards,
Anusha
You have to do it manually in the code by using CHECK AUTHORITY OBJECT.
If you want to check the authority for the first time when the application will run...do the coding within WDDOINIT of the Componentcontroller...
reward point if it is useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You have to perform the following Steps:
1. Create Object Class and Authority Object
2. Create Role
3. Assign the Authority Object to the Role and Generate
4. Assign Role to User
5. Use AUTHORITY-CHECK statement in your web application
1.Goto Transaction SU21
Create Object Class from the Toolbar available ( Ex: ZWEB)
Under the Object Class Create Authority Object ( Ex : ZWEBAPP )
2.Create a Role Using Transaction PFCG
Enter the Role Name ( Ex: ZROLE )and choose Create button
Choose Authorizations tab
Click Change Authorization data
Click Manually button in the Toolbar
3.give the Authority Object (Ex: ZWEBAPP ) you created.
Save and Generate ( Shift+ F5 )
4.To Assign the Role to a user goto Transaction SU01
Enter User Name and click edit
Move to Roles Tab
add the Role( Ex: ZROLE ) you have just Created in transaction PFCG
You have created Authority Object, Role
Assigned the Authority Object to the Role and
Assigned the Role to the User.
5.Now, In your Web Dynpro Application in WDDOINIT
you have to check whether the user has this Authority to execute this Application.
To check this use the statement
AUTHORITY-CHECK OBJECT 'ZWEBAPP' .
if sy-subrc = 0.
< Continue >
else.
<Navigate to some other Page >
endif.
Now, goto SU01 and enter the usernames and add the Role, to whom you want to give the access to the web application
Abhi
Edited by: Abhimanyu Lagishetti on Jun 11, 2008 12:10 PM
The current posters are correct, in WDA we continue to use the ABAP Authorization Check concept. Nothing new there for WDA. Here is a link to some online help that explains the process in greater detail:
[http://help.sap.com/saphelp_nw70/helpdata/EN/52/67167f439b11d1896f0000e8322d00/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/EN/52/67167f439b11d1896f0000e8322d00/frameset.htm]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You have to implement this manually through coding.
using CHECK AUTHORITY statement.
OR use Enterprise Portal to control the role based access.
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In General Role Based Authorization is controlled in Enterprise Portal.
In your Organization if you don't have Enterprise Portal, you could control the Authorization using
Authority Objects.
In WDDOINIT of the first view use the command
AUTHORITY-CHECK OBJECT <Authority obj. you created for the WDA>
if sy-subrc = 0.
< continue with the application >
else.
< navigate to some error view >
Abhi
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.