Show TOC Start of Content Area

Procedure documentation Testing the Access Protection Locate the document in its SAP Library structure

Use

You can now test the role assignments. For this test, you will log on to the application using each of the users. An error message should appear if the role assignment for the user does not allow him or her perform the corresponding action. See the table below.

Users and Corresponding Authorizations

User

Permitted Tasks

Non-Permitted Tasks

Pr_Agent

      View reservations

      Create and cancel reservations for all vehicle types

Not applicable

Agent

      View reservations

      Create and cancel reservations for the vehicle types:

¡        Economy

¡        Compact

¡        Intermediate

¡        Full Size

¡        Mini Van

Not allowed to create or cancel reservations for the vehicle types:

·        Premium

·        Luxury

Employee

View reservations

Not allowed to create or cancel reservations

Prerequisites

This graphic is explained in the accompanying textThis graphic is explained in the accompanying text

The AS Java is running.

This graphic is explained in the accompanying textThis graphic is explained in the accompanying text

You have completed the tutorial steps and assigned the roles to the users.

Procedure

Testing the Role Assignment for User Pr_Agent

...

       1.      To make sure that all sessions are cleared, close any open Web browsers and start a new one.

       2.      Access the Web Dynpro car rental application.

Example

http://localhost:50000/webdynpro/dispatcher/local/TutWD_CarRental/CarRentalApp/

Note

You can also start the application from the SAP NetWeaver Developer Studio. In the Web Dynpro Explorer, expand TutWD_CarRental ® Web Dynpro  ®Applications. Choose Run from the context menu for the CarRentalApp application.

       3.      Log on to the application as the user Pr_Agent. (If necessary, change the initial password.)

       4.      Create a reservation using the vehicle type Economy.

This reservation is created.

Note

Use the function Display all Bookings to refresh the list.

       5.      Create a reservation using the vehicle type Luxury or Premium.

This reservation is also created.

       6.      Create and cancel additional reservations.

All attempts should be successful.

When you are finished, make sure you have at least one reservation with a standard vehicle type and one with a premium or luxury vehicle type.

       7.      Close the Web browser.

Testing the Role Assignment for User Agent

Repeat these steps for the user Agent. Agent should be able to create and cancel reservations for all vehicle types except for Premium and Luxury.

...

       1.      Start a new Web browser.

       2.      Access the Web Dynpro car rental application again.

       3.      Log on to the application as the user Agent. (If necessary, change the initial password.)

       4.      Create a reservation using the vehicle type Economy.

This reservation is created.

       5.      Attempt to create a reservation using the vehicle type Luxury or Premium.

You receive an error.

       6.      Attempt to cancel a reservation that you created in the first test that has the luxury or premium vehicle type.

You receive an error.

       7.      Close the Web browser.

Testing the Role Assignment for User Employee

Repeat these steps for the user Employee. Employee should be able to view the existing reservations, but should not be able to create or cancel any reservations.

...

       1.      Start a new Web browser.

       2.      Access the Web Dynpro car rental application.

       3.      Log on to the application as the user Employee. (If necessary, change the initial password.)

       4.      Attempt to create or cancel car reservations.

You receive errors.

       5.      Close the Web browser.

Result

You have protected access to the quick car rental application using UME permissions, actions and roles.

Next Step:

If you want to continue with the optional step of adding a permission check in the Web Dynpro client, then see Checking Permissions in the Web Dynpro Frontend Client.

 

 

End of Content Area