From 9a98ffd298eeafc465202912cb9499f01c3b0569 Mon Sep 17 00:00:00 2001 From: "Dr. David A. Kunz" Date: Mon, 18 Jul 2022 14:02:43 +0200 Subject: [PATCH] fix(reviews): authorization restrictions (#382) --- reviews/srv/reviews-service.cds | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reviews/srv/reviews-service.cds b/reviews/srv/reviews-service.cds index 67399fee..a264ba8f 100644 --- a/reviews/srv/reviews-service.cds +++ b/reviews/srv/reviews-service.cds @@ -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:[