Interface BambooCachingPermissionManagerFacade

  • All Known Implementing Classes:
    BambooCachingPermissionManagerFacadeImpl

    @Internal
    public interface BambooCachingPermissionManagerFacade
    This is a variant of BambooPermissionManager that provides caching for retrieved ACLs and Sids. Should be configured as a non-singleton, non-wrapped bean in Spring. It's meant to be used only in places where you perform a lot of permission checks in a short period of time. Once cached, the objects are not invalidated. You can inject it directly in scope of actions but in regular beans you should use BambooCachingPermissionManagerFacadeFactory and obtain BambooCachingPermissionManagerFacade for the lifetime of method/request
    • Method Detail

      • hasPlanPermission

        boolean hasPlanPermission​(BambooPermission permission,
                                  long planId)
        Return true if currently authenticated principal has a permission to plan
        Parameters:
        permission - permission type
        Returns:
        true iff permissions is granted
      • hasPlanPermission

        boolean hasPlanPermission​(BambooPermission permission,
                                  PlanKey planKey)
                           throws NullPointerException
        Parameters:
        permission - permission type
        planKey - Plan key
        Returns:
        true if currently authenticated principal has a permission to plan
        Throws:
        NullPointerException - if plan is not found by key
      • hasPermission

        boolean hasPermission​(org.acegisecurity.acls.Permission permission,
                              @NotNull
                              @NotNull Object object)
        Return true if currently authenticated principal has a permission to an object
        Parameters:
        permission - permission type
        object - protected entity
        Returns:
        true iff permissions is granted