Saturday, 30 May 2009

Checking an Authorization Scheme within a PL/SQL Block

Recently, I had a quite tricky requirement where within a customer application I needed to check if user has a required role to run a process, edit a field or see an information. Many times these conditions were a combination of different authorization schemes and other rules determined during the runtime of the application. So the problem was not solved by just adding an authorization scheme to the object. More than one authorization scheme needed to be checked together with some other conditions. Using the apex_util package and the function public_check_authorization I was able to successfully acomplish those tasks. This is a modified example of the code I used there:

IF ( apex_util.public_check_authorization ('AUTH_GROUP_1')
OR apex_util.public_check_authorization ('AUTH_GROUP_2')
AND :p12_status = '0'
ELSIF ( apex_util.public_check_authorization ('AUTH_GROUP_2')
OR apex_util.public_check_authorization ('AUTH_GROUP_3')
AND :p12_status = '1'


Anonymous said...


Thanks very much for posting this. I had wanted to do this sort of thing a while back and had no clue how to mix and match existing authorization schemes.

Carsten said...

Hello Denes,

thanks for this great post. It is very helpfully!


Authorization Forms said...

When it comes to SQL i have lot of doubts..but when people like you provided such good articles..i have no more doubts..thanks a lot for sharing.need few more posts on querying SQL and reporting.

Authorization Forms

Denes Kubicek said...


Denes Kubicek

Anonymous said...

Thank you so much for the information. It saved a lot of time for me. Thanks once again

Pradeep Appslure said...

Appslure is one of the best Software Development Company in Delhi. There are many Software development Companies in Gurgaon, Mumbai, Noida. Appslure have most satisfied clients.

Mega said...

The above content is very interesting to read.
basic networking interview questions and answers
ccna interview questions and answers pdf

Buy SEO Service said...

Thankyou for the valuable content.It was really helpful in understanding the concept.50 High Quality Backlinks for just 50 INR
2000 Backlink at cheapest
5000 Backlink at cheapest
Boost DA upto 15+ at cheapest
Boost DA upto 25+ at cheapest

IamLinkfeeder said...

David Forbes is president of Alliance Marketing Associates IncIamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder

Jon Hendo said...

B2B events and from corporate user conferences to association trade shows rely on reach to maximize their stakeholders’ longtail ROI in the form of future conversions In virtual events. virtual edge and A Must-Know Guide To Corporate Event Planning

Indu said...

great post ! This was actually what i was looking for and i am glad to came here!
F5 Load balancer Training
SAP Ariba Training
MuleSoft Training

Reshma said...

Such a great blog.Thanks for sharing.........
php training in hyderabad
PHP Training in Gurgaon