Files
cloud-cap-samples/media-store/srv/browse-tracks-service.cds
Dzmitry_Tamashevich@epam.com 70b0c85346 add custom authentication checks
2021-01-04 14:37:01 +01:00

38 lines
807 B
Plaintext

using {sap.capire.media.store as my} from '../db/schema';
service BrowseTracks {
@readonly
entity Tracks as projection on my.Tracks excluding {
alreadyOrdered
};
@readonly
entity MarkedTracks @(restrict : [
{
grant : ['*', ],
to : 'customer'
},
{
grant : '*',
to : 'employee'
},
]) as projection on my.Tracks;
/*
Below entities exposed
due to 'navigation property errors' when expanding with odata
*/
@readonly
entity Genres as projection on my.Genres {
* , tracks : redirected to Tracks
};
@readonly
entity Albums as projection on my.Albums {
* , tracks : redirected to Tracks
};
@readonly
entity Artists as projection on my.Artists;
}