Header Ads

Header ADS

Control Access to a Page in Oracle Apex

Control Access to a Page in Oracle Apex

Topic Introduction: To Control Access to a Page in Oracle Apex we need to create authorization schemes that prevent a user to access a page if that user does not have permission on the specific Page on an application. In this tutorial, we will discuss how to Control Access to a Page in Oracle Apex. follow step by step description given below.

Control Access to a Page in Oracle Apex



1. Create a table for storing User wise Page Permission

CREATE TABLE page_authorization
(
    authorization_id    NUMBER PRIMARY KEY,
    user_name VARCHAR2 (32),
    page_id NUMBER
);

2. Store data on this table
3. Create an Authorization Scheme
  • Go Shared Components of the application
  • Select Authorization Schemes
  • Click Create button
  • Choose From Scratch radio button
  • Click on the Next button
            Name: Give the Name for the scheme
            Scheme type: Select Exists SQL query
            SQL query: Give the SQL Script to The Box

select distinct user_name,page_id
from page_authorization
where page_id is not null
and user_name=:app_user
and page_id=:app_page_id;
 
        Identify error message displayed when scheme violated: You have no permission on this page.                Please contact your admin.
  • Validate authorization scheme:



4. Now go to a page on the application
  • Go Page property ==>Security
  • Authorization scheme: Select Created Authorization Scheme Name
  • Save the page

5. Now Run the page for testing the Authorization scheme effect

No comments

Theme images by Deejpilot. Powered by Blogger.