Advanced ways using the Authorization Schemes inside APEX

Von Tobias Arnhold 12.05.2011
The standard way to check the authorization is to select the correct scheme inside the security area:

What are authorization schemes and how do you create them?

There are a couple of hidden ways to check the authorization schemes differently to the standard way.

To check more then one authorization scheme with pl/sql use this hint from Denes Kubicek:

To check authorization schemes inside SQL follow this solution:

For those who do not understand German. Just create a simple function which let you use the authorization scheme function inside a sql statement:
create or replace function 
 my_check_auth(p_security_scheme in varchar2)
 return number is
  if apex_util.public_check_authorization(p_security_scheme) 
    return 1;
    return 0;
  end if;

  'VALID_USER' as return_val
from my_table
where col1 = 'NEW'
and (my_check_auth('AUTH_VALID_USER') = 1  
     or my_check_auth('AUTH_NEW_USER')

Post Tags: