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

 ##########
 File path: 
rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java
 ##########
 @@ -129,6 +139,11 @@ public LocationSummary get(String locationId, String 
fullConfig) {
     }
 
     public LocationSummary get(String locationId, boolean fullConfig) {
+        if (!Entitlements.isEntitled(mgmt().getEntitlementManager(), 
Entitlements.SEE_LOCATION, Entitlements.StringAndArgument.of(locationId+"| 
fullConfig: "+fullConfig, "see"))) {
+            throw WebResourceUtils.forbidden("User '%s' is not authorized to 
see locations",
 
 Review comment:
   Message should say `User '%s' is not authorized to see the location '%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:
[email protected]


With regards,
Apache Git Services

Reply via email to