Package com.atlassian.jira.security
Class ThreadLocalCachingPermissionManager
java.lang.Object
com.atlassian.jira.security.DefaultPermissionManager
com.atlassian.jira.security.WorkflowBasedPermissionManager
com.atlassian.jira.security.ThreadLocalCachingPermissionManager
- All Implemented Interfaces:
PermissionManager
-
Constructor Summary
ConstructorsConstructorDescriptionThreadLocalCachingPermissionManager(WorkflowPermissionFactory workflowPermissionFactory, PermissionContextFactory permissionContextFactory, ProjectPermissionTypesManager projectPermissionTypesManager, ProjectPermissionOverrideDescriptorCache projectPermissionOverrideDescriptorCache, ScopesRequestCacheDelegate scopesRequestCacheDelegate, ApplicationProperties applicationProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoidFlushes any cached project permissions for all users.getProjectObjects(ProjectPermissionKey permissionKey, ApplicationUser user) booleanhasPermission(ProjectPermissionKey permissionKey, Project project, ApplicationUser user) Checks whether the specified user has a specified permission within the context of a specified project.Methods inherited from class com.atlassian.jira.security.WorkflowBasedPermissionManager
hasPermission, hasPermission, hasPermission, hasPermission, hasPermission, hasPermission, hasPermissionMethods inherited from class com.atlassian.jira.security.DefaultPermissionManager
getAllGroups, getAllProjectPermissions, getArchivedProjectObjects, getArchivedProjects, getProjectPermission, getProjectPermissions, getProjects, getProjects, getProjects, hasPermission, hasProjects, hasProjects, hasProjectWidePermission, isGlobalPermission, removeGroupPermissions, removeUserPermissionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.security.PermissionManager
hasPublicAccess
-
Constructor Details
-
ThreadLocalCachingPermissionManager
public ThreadLocalCachingPermissionManager(WorkflowPermissionFactory workflowPermissionFactory, PermissionContextFactory permissionContextFactory, ProjectPermissionTypesManager projectPermissionTypesManager, ProjectPermissionOverrideDescriptorCache projectPermissionOverrideDescriptorCache, ScopesRequestCacheDelegate scopesRequestCacheDelegate, ApplicationProperties applicationProperties)
-
-
Method Details
-
getProjectObjects
public Collection<Project> getProjectObjects(ProjectPermissionKey permissionKey, ApplicationUser user) - Overrides:
getProjectObjectsin classDefaultPermissionManager
-
hasPermission
public boolean hasPermission(@Nonnull ProjectPermissionKey permissionKey, @Nonnull Project project, @Nullable ApplicationUser user) Description copied from interface:PermissionManagerChecks whether the specified user has a specified permission within the context of a specified project.- Specified by:
hasPermissionin interfacePermissionManager- Overrides:
hasPermissionin classWorkflowBasedPermissionManager- Parameters:
permissionKey- A non-global permission, i.e. a permission that is granted via a project contextproject- The project that is the context of the permission check.user- The person to perform the permission check for- Returns:
- true if the user has the specified permission in the context of the supplied project
- See Also:
-
flushCache
public void flushCache()Description copied from interface:PermissionManagerFlushes any cached project permissions for all users.- Specified by:
flushCachein interfacePermissionManager- Overrides:
flushCachein classDefaultPermissionManager
-