Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

How to use :APP_COMPONENT_ID in aduthorization scheme plugin

Jegor WielerApr 18 2024 — edited Apr 18 2024

Hi everyone,

I'm trying to create an authorization schema plugin using the function is_authorized(). I already found out that I can get the username with the help of "t_authorizationation.username" and according to this there should be the same for “t_authorization.component”, but I couldn't figure out how i get the :APP_COMPONENT_ID and the :APP_COMPONENT_TYPE from this.

My PL/SQL Code for the Plugin:

function is_authorized (
    p_authorization in apex_plugin.t_authorization,
    p_plugin        in apex_plugin.t_plugin )
    return apex_plugin.t_authorization_exec_result
is
    l_result apex_plugin.t_authorization_exec_result;

begin

    l_result.is_authorized := PACKAGE_AUTH.FUNCTION_AUTHORIZATION(p_authorization.username,:APP_COMPONENT_ID,:APP_PAGE_ID,:APP_ID,:WORKSPACE_ID,:APP_COMPONENT_TYPE); -- Function return TRUE or False
    
    return l_result;
end is_authorized;

Does anyone have an idea how to get the Component_ID and the Component_Type inside my plugin?

I would be very grateful for any advice!

Oracle Apex Version: 23.1.4
Best Regards
Jegor

This post has been answered by Karel Ekema on Apr 19 2024
Jump to Answer
Comments
Post Details
Added on Apr 18 2024
2 comments
93 views