Quantcast
Channel: SCN : All Content - BOPF Application Framework
Viewing all articles
Browse latest Browse all 309

BOPF: How to check authorization in data access class (DAC)

$
0
0

Hi,

 

I am writing a data access class to provide a BOPF Interface for existing database tables.

 

I discovered how to implement authorization checks within the methods (Reuse of existing tables using data access classes):

/BOBF/IF_BUF_DATA_ACCESS~QUERY

/BOBF/IF_FRW_QUERY~QUERY

 

The code I use looks like:

########################################

IF io_query_authorities IS BOUND.

       DATA ctx TYPE /bobf/s_frw_ctx_query.

       ctx-bo_key         = zif_lip_pa_c=>sc_bo_key.

       ctx-root_node_key  = zif_lip_pa_c=>sc_node-root.

       ctx-node_key       = iv_node_key.

       ctx-query_key      = iv_query_key.

       io_query_authorities->check_authority(

         EXPORTING

           is_ctx = ctx

           it_key = et_key

         IMPORTING

           et_failed_key = DATA(failed)

           ).

########################################

 

Now I am implementing the method /BOBF/IF_BUF_DATA_ACCESS~READ_BY_ATTRIBUTES. To my understanding this method is called by the BOPF framework when executing "retrieve by association" and needs an authorization check before returning information about nodes the user is not allowed to access. Unfortunately this method does not have the parameter io_query_authorities and therefore I do not know how to implement the authority check.

 

Is there any advice I can follow?

 

Kind Regards,

Thomas


Viewing all articles
Browse latest Browse all 309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>