Annotation Interface RequiresAnyPolicy


@Retention(RUNTIME) @Target(METHOD) public @interface RequiresAnyPolicy
Marks a CloudForge Manager REST controller method as requiring a resolved caller who is permitted at least one of the named policies. RequiresPolicy covers the common case of a single required policy; this covers the rarer case of one endpoint legitimately serving two distinct callers with two distinct policies — e.g. the Deploy wizard's "redeploy with changes" prefill (already gated by deploy:create to submit the redeploy) and a plain read-only viewer of the same lookup data (gated by its own dedicated policy instead, so it doesn't also need deploy rights just to look). value() is a plain array of policy-ID strings matching constants in com.cloudforgeci.manager.auth.ManagerPolicyCatalog — see RequiresPolicy's javadoc for why these are strings, not an enum.

Enforced by AuthorizationInterceptor against com.cloudforgeci.manager.web.AccessGuard#requireCaller followed by com.cloudforgeci.manager.auth.AuthService#hasAnyAuthority(Caller, String...), granting access if any named policy matches. See RequiresAccess for the "every method must carry exactly one of these annotations" contract.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Element Details