brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: entitlements scheme proposal
Date Fri, 27 Jun 2014 14:02:21 GMT
Github user aledsage 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 --
    For CLI, why would context be null? We can find which user is logged in and we can indicate
that it's called from CLI.
    For tests, that should never (if at all possible) drive an `@Nullable` on non-test code.

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