In Oracle APEX, Access Control Roles are part of a built-in access management system that lets developers define user roles (such as ADMIN, MANAGER, or USER) and use these roles to control access to application pages, buttons, or logic. When you manage multiple applications or promote apps between environments (development, test, production), Oracle APEX allows you to Copy or Subscribe to Access Control Roles from another application to maintain consistency.
What Are Access Control Roles?
Access Control Roles define what users can see or do inside an APEX application. They are used with APEX's Access Control feature to control authorization logic. Roles can be used to:
-
Show or hide pages, regions, or buttons
-
Control logic inside PL/SQL processes
-
Restrict actions to certain users or groups
For example:
-
ADMIN
can access everything -
MANAGER
may access only reports and some update features -
USER
might only be allowed to view records
To reuse roles across applications or environments, you can Copy or Subscribe to roles.
Option 1: Copy Access Control Roles
Copying means importing the roles from another application as a static copy. Once copied, the roles are part of your application and can be changed independently.
Steps to Copy Roles:
-
Go to Shared Components
Open your APEX application and click Shared Components. -
Select Access Control
Under the Security section, click Access Control. -
Click “Copy or Subscribe”
At the top-right corner of the Access Control Roles screen, click Copy or Subscribe. -
Choose the Source Application
You will see a list of available applications. Select the app you want to copy roles from. -
Select "Copy" Option
Choose the Copy radio button. This will import the roles and store them locally in your application. -
Review and Confirm
A list of roles will appear. Click Apply to complete the copy.
Use Copy when you want to base your roles on another app but allow custom changes in your own app.
Option 2: Subscribe to Access Control Roles
Subscribing links your application to the source application’s roles. If the roles change in the source app, you can refresh the subscription in your app to pull those changes.
Steps to Subscribe:
-
Open Shared Components > Access Control
-
Click “Copy or Subscribe”
-
Select the Source Application
Choose the application that contains the role definitions you want to reuse. -
Choose “Subscribe” Option
Select the Subscribe radio button. This will create a live subscription. -
Apply the Subscription
-
Refresh When Needed
Later, if roles are updated in the source app, go back to Access Control and click Refresh Subscription to pull changes.
Use Subscribe when you want multiple applications to share and maintain the same set of roles, especially in enterprise environments.
Benefits and Use Cases
Feature | Copy Roles | Subscribe to Roles |
---|---|---|
Editable | Yes (independent copy) | No (managed in source app) |
Auto-updated | No | Yes (when refreshed) |
Best for | Standalone or derived apps | Shared apps or environments |
Dependency | None | Depends on source app being available |
Important Notes
-
You must have developer access to both the source and target applications.
-
Subscribed roles cannot be edited in the target application. Changes must be made in the source app.
-
If you later decide to unsubscribe, the current roles remain but are converted to local copies.
You can copy access control roles either within the current application or from another application in the workspace. When copying a role from another application, you also have the option to subscribe to it.
Steps to Copy or Subscribe to Access Control Roles
Navigate to the Application Access Control page:
Go to the Workspace home page.
Click the App Builder icon.
Select the application where you want to copy or subscribe to roles.
On the Application home page, click Shared Components.
Under Security, select Application Access Control.
The Application Access Control page will display available roles along with details such as Subscribed From, Subscription Status, and Subscribers.
Copy a role within the current application:
Locate the role you want to copy and click Copy in the Copy column.
The Copy Role Wizard will appear.
Enter a unique name for the new role.
Click Copy Role to complete the process.
Copy a role from another application:
In the Tasks region, click Copy Role from another app.
The Copy Role Wizard will open.
Select the application from which you want to copy the role.
Choose the role you wish to copy.
Enable the Subscribe option if you want the copied role to stay linked to the original role.
Click Copy Role to finalize the process.