0
votes

I'm developing an application in APEX and ran into an authorization problem that I hope someone could help me solve.

How can I apply authorization schemes at the SQL level in APEX? For example, is it possible to create a report on a SQL query where the query returns different columns based on an authorization scheme defined in APEX?

1

1 Answers

3
votes

It is possible to check whether the current user has a given authorization in PL/SQL, but not in SQL.

In Apex 5 and later:

if apex_authorization.is_authorized ('AUTH_GROUP') then ...

For Apex 4.2 and earlier:

if apex_util.public_check_authorization ('AUTH_GROUP') then ...

It returns a boolean so you can't use it in SQL.