audit log

This commit is contained in:
Koch
2022-09-01 15:49:32 +02:00
parent 2f5eff8d96
commit a8d3ac2796
4 changed files with 32 additions and 3315 deletions

View File

@@ -26,6 +26,13 @@ annotate bookshop.CustomerPostalAddress with @PersonalData : {
country @PersonalData.IsPotentiallyPersonal; country @PersonalData.IsPotentiallyPersonal;
} }
annotate bookshop.Orders with @PersonalData.EntitySemantics : 'Other'
{
ID @PersonalData.FieldSemantics : 'ContractRelatedID';
Customer @PersonalData.FieldSemantics : 'DataSubjectID';
personalComment @PersonalData.IsPotentiallyPersonal;
}
// annotations for Audit Log // annotations for Audit Log
annotate bookshop.Customers with @AuditLog.Operation : { annotate bookshop.Customers with @AuditLog.Operation : {
Read : true, Read : true,
@@ -34,9 +41,18 @@ annotate bookshop.Customers with @AuditLog.Operation : {
Delete : true Delete : true
}; };
// annotations for Audit Log
annotate bookshop.CustomerPostalAddress with @AuditLog.Operation : { annotate bookshop.CustomerPostalAddress with @AuditLog.Operation : {
Read : true, Read : true,
Insert : true, Insert : true,
Update : true, Update : true,
Delete : true Delete : true
}; };
// annotations for Audit Log
annotate bookshop.Orders with @AuditLog.Operation : {
Read : true,
Insert : true,
Update : true,
Delete : true
};

View File

@@ -1,27 +1,29 @@
// Proxy for importing schema from bookshop sample // Proxy for importing schema from bookshop sample
using { sap.capire.bookshop.Books } from '@capire/bookshop'; using { sap.capire.bookshop.Books } from '../../bookshop/db/schema';
using { sap.capire.bookshop.Orders } from '@capire/orders'; using { sap.capire.bookshop.Orders } from '../../orders/db/schema';
using { sap.capire.bookshop.OrderItems } from '@capire/orders'; using { sap.capire.bookshop.OrderItems } from '../../orders/db/schema';
using { Country, managed, cuid } from '@sap/cds/common'; using { Country, managed, cuid } from '@sap/cds/common';
namespace sap.capire.bookshop; namespace sap.capire.bookshop;
extend Orders with { extend Orders with {
Customer : Association to Customers; Customer : Association to Customers;
personalComment : String;
} }
entity Customers : cuid, managed { entity Customers : cuid, managed {
email : String; email : String;
firstName : String; firstName : String;
lastName : String; lastName : String;
creditCardNo : String; creditCardNo : String;
dateOfBirth : Date; dateOfBirth : Date;
postalAddress : Association to CustomerPostalAddress on postalAddress.Customer = $self;
} }
entity CustomerPostalAddress : cuid, managed { entity CustomerPostalAddress : cuid, managed {
Customer : Association to one Customers; Customer : Association to one Customers;
street : String(128); street : String(128);
town : String(128); town : String(128);
country : Country; country : Country;
someOtherField : String(128); someOtherField : String(128);
}; };

3300
gdpr/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,7 @@
//using from '@capire/orders'; using {sap.capire.bookshop as db} from '../db/data-privacy';
using {sap.capire.bookshop as db} from '../db/data-privacy'; using {sap.capire.bookshop.Books} from '../db/data-privacy';
using {sap.capire.bookshop.Books} from '@capire/bookshop'; using {sap.capire.bookshop.Orders} from '../db/data-privacy';
using {sap.capire.bookshop.Orders} from '@capire/orders'; using {sap.capire.bookshop.OrderItems} from '../db/data-privacy';
using {sap.capire.bookshop.OrderItems} from '@capire/orders';
@requires: 'PersonalDataManagerUser' // security check @requires: 'PersonalDataManagerUser' // security check
service PDMService { service PDMService {