Posts

Showing posts with the label Day 6: CDS Access Control (DCL)

Day 6: CDS Access Control (DCL)

  Day 6: CDS Access Control (DCL) Concept of Authorization in CDS @AccessControl.authorizationCheck Define DCL objects Practice : Create a DCL restricting data based on user 🔹 1. Concept of Authorization in CDS In traditional ABAP, data access control is often implemented in the application logic. However, in ABAP CDS (Core Data Services) , we implement access control at the data model level using DCL (Data Control Language) . 📌 Why Authorization in CDS? To ensure sensitive data is not exposed to unauthorised users. To move security logic closer to the data layer . To support reusability and consistency across apps (Fiori, OData, etc.). 🔹 2. @AccessControl.authorizationCheck This CDS annotation tells the system how the CDS view handles authorisation. 🔹 Syntax @AccessControl.authorizationCheck: #CHECK 📘 Options: #CHECK : Apply authorisation as per DCL rules. #NOT_REQUIRED : No authorisation check needed (used for public/non-sensitive data). #PRIVILEGED_ONLY : Only privileged...