You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2019/03/29 13:36:15 UTC

[GitHub] [brooklyn-server] tbouron commented on a change in pull request #1061: Granularity entitlement control

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:
users@infra.apache.org


With regards,
Apache Git Services