brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <>
Subject [GitHub] incubator-brooklyn pull request: entitlements scheme proposal
Date Fri, 27 Jun 2014 03:00:17 GMT
Github user ahgittin commented on a diff in the pull request:
    --- Diff: api/src/main/java/brooklyn/management/entitlement/ ---
    @@ -0,0 +1,16 @@
    +import javax.annotation.Nonnull;
    +import javax.annotation.Nullable;
    + * Entitlement lookup relies on:
    + * <li>an "entitlement context", consisting of at minimum a string identifier of
the user/actor for which entitlement is being requested
    + * <li>an "entitlement class", representing the category of activity for which
entitlement is being requested
    + * <li>an "entitlement class argument", representing the specifics of the activity
for which entitlement is being requested 
    + */
    +public interface EntitlementManager {
    +    public <T> boolean isEntitled(@Nullable EntitlementContext context, @Nonnull
EntitlementClass<T> entitlementClass, @Nullable T entitlementClassArgument);
    --- End diff --
    this may be invoked from places where no entitlement context is known, such as the CLI
or tests.  all REST calls when properly configured with authentication will have an entitlement
context set, however, so it is safe (and normal) for global entitlements managers to simply
return true in this case.
    @andreaturli can you note that in the javadoc, and that implementers must be prepared
for this case

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message