11 Controlling Access with Users and Roles

Only authenticated users can access your app. They see only the pages and data they are authorized to use, and can perform only the actions their role allows. Their organizational duties shape their app experience.

Your app's Authentication Scheme defines how users sign in. Roles reflect relevant responsibilities, and Role Assignments link users to roles. APEX accounts are built-in, but role-based security works the same with external identity providers.

Each Authorization Scheme names a rule that grants or denies access based on flexible criteria. Role membership is most common, but custom rules can use SQL or PL/SQL, too. By configuring authorization rules on application elements, you tailor each user's experience based on their role.

When necessary, you can define row-level data security policies to control what data each user sees. A policy can reuse authorization schemes to keep access rules in one place.

The examples in this section use a simple Woods HR app based on EBA_DEMO_EMP and a copy of the familiar EMP table, with a few additional employees added. The figure below shows three colleagues, one uses a laptop, another holds a tablet, and a third uses his smartphone. Each one sees the application functionality and data that is automatically tailored to their functional role.

Figure 11-1 Deliver User Experience Tailored to Each User's Functional Role