add custom authentication checks
This commit is contained in:
committed by
Daniel Hutzel
parent
3cf02cb567
commit
70b0c85346
@@ -2,24 +2,36 @@ using {sap.capire.media.store as my} from '../db/schema';
|
||||
|
||||
service BrowseTracks {
|
||||
@readonly
|
||||
entity Tracks as projection on my.Tracks excluding {
|
||||
entity Tracks as projection on my.Tracks excluding {
|
||||
alreadyOrdered
|
||||
};
|
||||
|
||||
@(requires : 'authenticated-user')
|
||||
@readonly
|
||||
entity MarkedTracks as projection on my.Tracks;
|
||||
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 {
|
||||
entity Genres as projection on my.Genres {
|
||||
* , tracks : redirected to Tracks
|
||||
};
|
||||
|
||||
@readonly
|
||||
entity Albums as projection on my.Albums {
|
||||
entity Albums as projection on my.Albums {
|
||||
* , tracks : redirected to Tracks
|
||||
};
|
||||
|
||||
@readonly
|
||||
entity Artists as projection on my.Artists;
|
||||
entity Artists as projection on my.Artists;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user