11.6.2 Driving Read-Only with Authorization Rule

Use the IS_AUTHORIZED function in a PL/SQL Read Only expression to decide when data can be edited.

The Salary Review page needs to let HR Representatives edit Salary and Commission, but managers should see a read-only view of their own reports only. To make these two columns read‑only for users who are not HR Representatives, as shown below, use a PL/SQL expression to configure their Read Only behavior. These two columns are read-only when:

not apex_authorization.is_authorized('HR Representatives Only')

Figure 11-23 Make Sal and Comm Columns Read Only Unless User is HR Representative