replacing restriction conditions

This commit is contained in:
Dzmitry_Tamashevich@epam.com
2020-11-05 00:23:19 +03:00
committed by Daniel Hutzel
parent 34acef85b6
commit ecdc32bad1

View File

@@ -1,6 +1,9 @@
using {sap.capire.media.store as my} from '../db/schema'; using {sap.capire.media.store as my} from '../db/schema';
service Users { service Users {
// redundant entity
// We need actions without exposing entity for now.
// But we forced to expose for make actions work.
entity Customers @(restrict : [{ entity Customers @(restrict : [{
grant : [ grant : [
'READ', 'READ',
@@ -22,28 +25,10 @@ service Users {
email : String(60); email : String(60);
} }
@(restrict : [ @(requires : 'authenticated-user')
{
grant : '*',
to : 'customer'
},
{
grant : '*',
to : 'employee'
},
])
action updatePerson(person : Person); action updatePerson(person : Person);
@(restrict : [ @(requires : 'authenticated-user')
{
grant : '*',
to : 'customer'
},
{
grant : '*',
to : 'employee'
},
])
function getPerson() returns Person; function getPerson() returns Person;
action login(email : String(111), password : String(200)) returns { action login(email : String(111), password : String(200)) returns {