tbouron commented on a change in pull request #1061: Granularity entitlement
control
URL: https://github.com/apache/brooklyn-server/pull/1061#discussion_r274305390
##########
File path:
rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/BundleResource.java
##########
@@ -153,6 +154,10 @@ public TypeDetail getTypeExplicitVersion(String
symbolicName, String version, St
@Override
public BundleInstallationRestResult remove(String symbolicName, String
version, Boolean force) {
ManagedBundle b = lookup(symbolicName, version);
+ if (!Entitlements.isEntitled(mgmt().getEntitlementManager(),
Entitlements.MODIFY_CATALOG_ITEM,
Entitlements.StringAndArgument.of(symbolicName+(Strings.isBlank(version) ? "" :
":"+version), "delete"))) {
+ throw WebResourceUtils.forbidden("User '%s' is not authorized to
remove catalog item '%s:%s'",
Review comment:
Sorry, I should have caught that last time but I think it should say `User
'%s' is not authorized to modify catalog item '%s:%s'`
----------------------------------------------------------------
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