Monday, 12 October 2015

Role based Authorization in Oracle APEX5

Objective:
To implement Role based Authorization in Oracle APEX Application, in version 5.
Application Item: USER_ROLE
Table: ROLE_ACCESS_CONTROL
The purpose of this table is to store the privileges on Regions, Buttons and Items, for each role. Page access is controlled through the Region access (Even if one Region in a Page is given access, its Page will appear; Components cannot be created without a “Region”;)

Column Name
Data Type
Comments
ROLE_ACCESS_ID
NUMBER
Primary Key
USER_ROLE
VARCHAR2(30)
Role Name
APP_ID
NUMBER
APEX System Variable
PAGE_ID
NUMBER
APEX System Variable
REGION_ID
NUMBER
APEX System Variable
COMPONENT_ID
VARCHAR2(30)
APEX5 System Variable
COMPONENT_NAME
VARCHAR2(30)
APEX5 System Variable
COMPONENT_TYPE
VARCHAR2(30)
APEX5 System Variable
DISPLAY_IND
CHAR(1)
Flag to Display/Hide a Component
READONLY_IND
CHAR(1)
Flag to set Read-Only for an Item
CREATED_BY
NUMBER
WHO columns
CREATED_DATE
DATE
UPDATED_BY
NUMBER
UPDATED_DATE
DATE


User Interface:




















Authorization Schemes to be created:
1. List_Access – To control the Menu items
2. Role_authorization – To control access to all components

3. Role_authorization_readonly_item – To control the read-only property of an item, through the authorization scheme














To enable the menu, in the Navigation:













Set the SECURITY è AUTHORIZATION SCHEME with the custom authorization scheme  created (“ROLE_AUTHORIZATION”), for all Pages, Regions and Buttons.








Set the READ ONLY property as below, for all the Items which needs to be controlled as READ-ONLY:




4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. hi,

    very helpful article.

    could you share the pl/sql code for List_Access and Role_authorization authorizations?


    regards.

    ReplyDelete
  3. Hi,
    Request you to please share the List_Access in detail.
    for list access the error showing is Error processing condition.
    ORA-06550: line 1, column 44: PLS-00103:
    component.type: APEX_APPLICATION_LIST_ENTRIES
    component.id: 8807706125983334
    component.name: Home
    error_statement:
    declare function x return boolean is begin ;
    return null; end; begin wwv_flow.g_boolean := x; end;

    ReplyDelete
  4. "Role-Based Authorization in Oracle APEX 5" is empowerment at its best, Your explanation of implementing role-based securing sheet. Enabling precise control over user privileges. Security Tips Cybersecurity It is harnessing APEX's capabilities to create robust. You can see data table.

    ReplyDelete