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';
service Users {
// redundant entity
// We need actions without exposing entity for now.
// But we forced to expose for make actions work.
entity Customers @(restrict : [{
grant : [
'READ',
@@ -22,28 +25,10 @@ service Users {
email : String(60);
}
@(restrict : [
{
grant : '*',
to : 'customer'
},
{
grant : '*',
to : 'employee'
},
])
@(requires : 'authenticated-user')
action updatePerson(person : Person);
@(restrict : [
{
grant : '*',
to : 'customer'
},
{
grant : '*',
to : 'employee'
},
])
@(requires : 'authenticated-user')
function getPerson() returns Person;
action login(email : String(111), password : String(200)) returns {