tbouron commented on a change in pull request #1061: Granularity entitlement control URL: https://github.com/apache/brooklyn-server/pull/1061#discussion_r270409222
########## File path: rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/PolicyConfigResource.java ########## @@ -62,7 +62,14 @@ @Override public Map<String, Object> batchConfigRead(String application, String entityToken, String policyToken) { // TODO: add test + Entity entity = brooklyn().getEntity(application, entityToken); + if (entity != null && !Entitlements.isEntitled(mgmt().getEntitlementManager(), Entitlements.SEE_ENTITY, entity)) { + throw WebResourceUtils.forbidden("User '%s' is not authorized to see the entity '%s'", Review comment: Message should say `User '%s' is not authorized to see the configuration for 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