Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
aparna_kuchibhotla
Product and Topic Expert
Product and Topic Expert
1,715
Continuing from “Writing DCLs on Union Views in CDS - Part 1” ,

  1. Now , let’s try giving no authorization to display Refregirator products under this role .




2. Let's create DCL ( Access Control ) on the union view :

 

CASE 1 : AND condition with aspect_pfcg statements in DCL



Let's execute the union view and see the result :



RESULT : Since, Refregirator view did not pass through authorization, none of the other product records are displayed too. 

This is not what we wanted.

CASE 2 : OR condition with aspect_pfcg statements in DCL



Let's execute the union view and see the result :



RESULT : Since Other product views passed the authorization, even refregirator product records are visible to user due to OR condition. 

This is not what we wanted .

CASE 3 (Solution) : Multiple grant select statements with where condition in a DCL



Here multiple grant select statements are written on same view . See the difference from above cases. 

Let's execute the union view and see the result :



RESULT :

The refregirator products are not displayed to the user since there is no authorization and rest all products are visible. 

This is what we wanted and meeting our expected requirement.

 
5 Comments
Labels in this area