9.4. Shaping Access

In the previous section, you used a rather blunt approach to limiting access to entire components of your application. But you can set conditional display specifications on most portions of a page and region, down to the level of individual items or columns.

To allow you to discover the type of flexible access control you can implement with APEX, this section will walk you through changing the display of the Orders portion of the master-detail form to allow managers capabilities beyond those of mere sales reps. As you recall, you added a PL/SQL procedure in the previous chapter to automatically set the ship date on an order to three business days past the order date.

This consistent approach will guarantee a certain level of customer satisfaction, but there may be times when you want to allow more rapid shipping. However, you have to limit the people who would be allowed to change the ship date for an order. You can't let a sales rep change a ship date, since most sales reps want to do all they can to make their customers happiest, up to and including immediate shipment. You would also not want to allow the ADMIN user to change the ship date, since these users may not understand the business reasons why you would, or would not, want to stretch the rules for a particular customer.

The proper way in this scenario is to allow the MANAGER to change the ship date. The way you can implement this functionality is use another conditional display, one that will limit ...

Get Beginning Oracle® Application Express now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.