public interface

PermissionContext

com.atlassian.jira.permission.PermissionContext
Known Indirect Subclasses

Class Overview

Represents the context in which a permission evaluation is to be made. Permission requests are of the form: subject, verb, object (eg. "User fred wishes to comment on ABC-123"), where: subject = User object verb = permission Id object = Issue, project etc. A PermissionContext encapsulates the object.

To create PermissionContext objects, use the PermissionContextFactory

Summary

Public Methods
Issue getIssue()
GenericValue getProject()
This method is deprecated. Use getProjectObject() instead. Since v5.0.
Project getProjectObject()
Returns the Project in this context.
StepDescriptor getRelevantStepDescriptor()
Returns the relevant workflow step for the Issue in this context
Status getStatus()
boolean hasIssuePermissions()
Whether we have enough information to look up issue-specific (workflow) permissions.
boolean isHasCreatedIssue()
This method is deprecated. Use hasIssuePermissions() instead. Since v5.0.

Public Methods

public Issue getIssue ()

public GenericValue getProject ()

This method is deprecated.
Use getProjectObject() instead. Since v5.0.

Returns the Project in this context.

Returns
  • the Project in this context.

public Project getProjectObject ()

Returns the Project in this context.

Returns
  • the Project in this context.

public StepDescriptor getRelevantStepDescriptor ()

Returns the relevant workflow step for the Issue in this context

Returns
  • the relevant workflow step for the Issue in this context

public Status getStatus ()

public boolean hasIssuePermissions ()

Whether we have enough information to look up issue-specific (workflow) permissions.

True if this PermissionContext has an existing fully-formed issue (not one that is still being created).

Returns
  • true if this PermissionContext has an existing fully-formed issue.

public boolean isHasCreatedIssue ()

This method is deprecated.
Use hasIssuePermissions() instead. Since v5.0.

Whether this PermissionContext has an existing fully-formed issue (not one that is still being created). This returns false on the second issue creation page, and on the quick sub-task creation form, where the issue type is unknown.

Returns
  • true if this PermissionContext has an existing fully-formed issue.