Package com.atlassian.jira.permission
Class DefaultPermissionContextFactory
java.lang.Object
com.atlassian.jira.permission.DefaultPermissionContextFactory
- All Implemented Interfaces:
PermissionContextFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPermissionContext
(OperationContext operationContext, Issue issue) Checks if we're in a workflow operation, and if so constructs a PermissionContext with the destination status.getPermissionContext
(Issue issue) Get the permission context for the given issue.getPermissionContext
(Issue issue, Status issueStatus) Get the permission context for the given issue if it was in the given status.getPermissionContext
(Issue issue, com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor) Get the permission context for the given issue at the end of the given workflow action.getPermissionContext
(Project project) Get the permission context for the given project.getPermissionContext
(org.ofbiz.core.entity.GenericValue projectOrIssue)
-
Constructor Details
-
DefaultPermissionContextFactory
-
-
Method Details
-
getPermissionContext
Description copied from interface:PermissionContextFactory
Get the permission context for the given issue.- Specified by:
getPermissionContext
in interfacePermissionContextFactory
- Parameters:
issue
- The issue for which the permission context is to be generated.- Returns:
- the context that should be used for permission checking.
-
getPermissionContext
Description copied from interface:PermissionContextFactory
Get the permission context for the given project.- Specified by:
getPermissionContext
in interfacePermissionContextFactory
- Parameters:
project
- The project for which the permission context is to be generated.- Returns:
- the context that should be used for permission checking.
-
getPermissionContext
Description copied from interface:PermissionContextFactory
Get the permission context for the given issue if it was in the given status.- Specified by:
getPermissionContext
in interfacePermissionContextFactory
- Parameters:
issue
- The issue for which the permission context is to be generated.issueStatus
- The status that we pretend the issue is in for checking permissions.- Returns:
- the context that should be used for permission checking.
-
getPermissionContext
- Specified by:
getPermissionContext
in interfacePermissionContextFactory
-
getPermissionContext
public PermissionContext getPermissionContext(Issue issue, com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor) Description copied from interface:PermissionContextFactory
Get the permission context for the given issue at the end of the given workflow action.- Specified by:
getPermissionContext
in interfacePermissionContextFactory
- Parameters:
issue
- The issue for which the permission context is to be generated.actionDescriptor
- The workflow action that is occurring.- Returns:
- the context that should be used for permission checking.
-
getPermissionContext
Checks if we're in a workflow operation, and if so constructs a PermissionContext with the destination status. Otherwise returns a normal PC wrapping the issue.- Specified by:
getPermissionContext
in interfacePermissionContextFactory
-