11.2 IS_AUTHORIZED Function
This function determines if the current user passes the authorization with name p_authorization_name
. For performance reasons, authorization results are cached. Because of this, the function may not always evaluate the authorization when called, but take the result out of the cache.
See Also:
Changing the Evaluation Point Attribute in Oracle APEX App Builder User’s Guide
Syntax
APEX_AUTHORIZATION.IS_AUTHORIZED (
p_authorization_name IN VARCHAR2 )
RETURN BOOLEAN;
Parameters
Parameter | Description |
---|---|
p_authorization_name |
The name of an authorization scheme in the application. |
Returns
Parameter | Description |
---|---|
TRUE |
If the authorization is successful. |
FALSE |
If the authorization is not successful. |
Example
This example prints the result of the authorization "User Is Admin."
BEGIN
sys.htp.p('User Is Admin: '||
case apex_authorization.is_authorized (
p_authorization_name => 'User Is Admin' )
WHEN true THEN 'YES'
WHEN false THEN 'NO'
ELSE 'null'
END);
END;
Parent topic: APEX_AUTHORIZATION