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

 ##########
 File path: 
rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/AdjunctResource.java
 ##########
 @@ -211,6 +211,11 @@ public Response destroy(String application, String 
entityToken, String adjunctId
         Entity entity = brooklyn().getEntity(application, entityToken);
         EntityAdjunct adjunct = brooklyn().getAdjunct(entity, adjunctId);
 
+        if (!Entitlements.isEntitled(mgmt().getEntitlementManager(), 
Entitlements.DELETE_ADJUNCT, adjunct)) {
+            throw WebResourceUtils.forbidden("User '%s' is not authorized to 
remove adjuncts '%s'",
 
 Review comment:
   Sorry, I should have caught that last time but I think it should say 
`delete` instead of `remove` for consistency

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to