tbouron commented on a change in pull request #1061: Granularity entitlement 
control
URL: https://github.com/apache/brooklyn-server/pull/1061#discussion_r270409599
 
 

 ##########
 File path: 
rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/PolicyResource.java
 ##########
 @@ -112,6 +119,11 @@ public Status getStatus(String application, String 
entityToken, String policyId)
     public Response start( String application, String entityToken, String 
policyId) {
         Policy policy = brooklyn().getPolicy(application, entityToken, 
policyId);
 
+        if (!Entitlements.isEntitled(mgmt().getEntitlementManager(), 
Entitlements.START_POLICY, policy)) {
+            throw WebResourceUtils.forbidden("User '%s' is not authorized to 
remove policies",
 
 Review comment:
   Message should say `User '%s' is not authorized to start the policy '%s'`
   Please also check the parameters for the templated message

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to