Here’s another in my periodic “notes to myself” series.
Today, I needed to include an authorization check within a PL/SQL region, since I wanted the region to always render, but some of the content needed to be restricted. This is one of those features that I know exists, but I can never remember exactly the syntax for it. The answer?
if apex_authorization.is_authorized( '<auth scheme>' ) then...
The most annoying thing about this is that my first web search pointed me at the 3.2 documentation, which used an apex_util.public_check_authorization function for the same thing. But that function’s been deprecated. Always make sure you’re looking at the most recent documentation!
Leave a Reply