fix(reviews): authorization restrictions (#382)

This commit is contained in:
Dr. David A. Kunz
2022-07-18 14:02:43 +02:00
committed by GitHub
parent 57cda61b02
commit 9a98ffd298

View File

@@ -26,10 +26,10 @@ service ReviewsService {
// Access control restrictions
annotate ReviewsService.Reviews with @restrict:[
{ grant:'GET', to:'any' }, // everybody can read reviews
{ grant:'READ', to:'any' }, // everybody can read reviews
{ grant:'CREATE', to:'authenticated-user' }, // users must login to add reviews
{ grant:'UPDATE', to:'authenticated-user', where:'reviewer=$user' },
{ grant:'DELET', to:'admin' },
{ grant:'DELETE', to:'admin' },
];
annotate ReviewsService with @restrict:[