Package com.atlassian.bamboo.security
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 Summary
Modifier and TypeMethodDescriptionboolean
hasPermission
(org.acegisecurity.acls.Permission permission, @NotNull Object object) Return true if currently authenticated principal has a permission to an objectboolean
hasPlanPermission
(BambooPermission permission, long planId) Return true if currently authenticated principal has a permission to planboolean
hasPlanPermission
(BambooPermission permission, PlanKey planKey)
-
Method Details
-
hasPlanPermission
Return true if currently authenticated principal has a permission to plan- Parameters:
permission
- permission type- Returns:
- true iff permissions is granted
-
hasPlanPermission
- Parameters:
permission
- permission typeplanKey
- 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 typeobject
- protected entity- Returns:
- true iff permissions is granted
-