tbouron commented on a change in pull request #1061: Granularity entitlement
control
URL: https://github.com/apache/brooklyn-server/pull/1061#discussion_r274303689
##########
File path:
core/src/main/java/org/apache/brooklyn/core/mgmt/entitlement/Entitlements.java
##########
@@ -66,13 +69,36 @@
public static EntitlementClass<StringAndArgument> MODIFY_CATALOG_ITEM =
new BasicEntitlementClassDefinition<StringAndArgument>("catalog.modify",
StringAndArgument.class);
public static EntitlementClass<Entity> SEE_ENTITY = new
BasicEntitlementClassDefinition<Entity>("entity.see", Entity.class);
+ public static EntitlementClass<Entity> RENAME_ENTITY = new
BasicEntitlementClassDefinition<Entity>("entity.rename", Entity.class);
public static EntitlementClass<EntityAndItem<String>> SEE_SENSOR = new
BasicEntitlementClassDefinition<EntityAndItem<String>>("sensor.see",
EntityAndItem.typeToken(String.class));
public static EntitlementClass<EntityAndItem<String>> SEE_CONFIG = new
BasicEntitlementClassDefinition<EntityAndItem<String>>("config.see",
EntityAndItem.typeToken(String.class));
public static EntitlementClass<TaskAndItem<String>> SEE_ACTIVITY_STREAMS =
new
BasicEntitlementClassDefinition<TaskAndItem<String>>("activity.streams.see",
TaskAndItem.typeToken(String.class));
// string is effector name; argument may be a map or a list, depending how
the args were supplied
public static EntitlementClass<EntityAndItem<StringAndArgument>>
INVOKE_EFFECTOR = new
BasicEntitlementClassDefinition<EntityAndItem<StringAndArgument>>("effector.invoke",
EntityAndItem.typeToken(StringAndArgument.class));
public static EntitlementClass<Entity> MODIFY_ENTITY = new
BasicEntitlementClassDefinition<Entity>("entity.modify", Entity.class);
-
+
+ // Adjunct entitlements
+ public static EntitlementClass<EntityAdjunct> DELETE_ADJUNCT = new
BasicEntitlementClassDefinition<>("adjunct.delete", EntityAdjunct.class);
+
+ // Location entitlements
+ public static EntitlementClass<StringAndArgument> ADD_LOCATION = new
BasicEntitlementClassDefinition<>("location.add", StringAndArgument.class);
+ public static EntitlementClass<StringAndArgument> DELETE_LOCATION = new
BasicEntitlementClassDefinition<>("location.remove", StringAndArgument.class);
+ public static EntitlementClass<StringAndArgument> SEE_LOCATION = new
BasicEntitlementClassDefinition<>("location.see", StringAndArgument.class);
+
+ // Policy entitlements
+ public static EntitlementClass<StringAndArgument> ADD_POLICY = new
BasicEntitlementClassDefinition<>("policy.add", StringAndArgument.class);
+ public static EntitlementClass<Policy> DELETE_POLICY = new
BasicEntitlementClassDefinition<>("policy.remove", Policy.class);
+ public static EntitlementClass<Policy> START_POLICY = new
BasicEntitlementClassDefinition<>("policy.start", Policy.class);
+ public static EntitlementClass<Policy> STOP_POLICY = new
BasicEntitlementClassDefinition<>("policy.stop", Policy.class);
+
+ public static EntitlementClass<Void> SYSTEM_ADMIN = new
BasicEntitlementClassDefinition<>("system.admin", Void.class);
+ public static EntitlementClass<Void> HA_STATS = new
BasicEntitlementClassDefinition<>("system.haStats", Void.class);
+ public static EntitlementClass<Void> HA_ADMIN = new
BasicEntitlementClassDefinition<>("system.haSdmin", Void.class);
Review comment:
I think the name of the entitlement should be `system.ha.admin` for
consistency with the other entitlements
----------------------------------------------------------------
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