com.atlassian.jira.security.plugin
Interface ProjectPermissionOverride

All Known Implementing Classes:
CantCommentProjectPermissionOverride, CantEditIssueProjectPermissionOverride, CantTransitionIssueProjectPermissionOverride

public interface ProjectPermissionOverride

Implementations of this module are supposed to provide the decision if the user has the permission to the project.


Nested Class Summary
static class ProjectPermissionOverride.Decision
           
static class ProjectPermissionOverride.Reason
          Justification of the decision made by hasPermission(ProjectPermissionKey, com.atlassian.jira.project.Project, com.atlassian.jira.user.ApplicationUser) method.
 
Method Summary
 ProjectPermissionOverride.Reason getReason(ProjectPermissionKey projectPermissionKey, Project project, ApplicationUser applicationUser)
          The implementation of this method should return a description explaining how does the permission overriding affects if the user has permissions to the selected project.
 ProjectPermissionOverride.Decision hasPermission(ProjectPermissionKey projectPermissionKey, Project project, ApplicationUser applicationUser)
          The implementation of this method is supposed to either deny permissions or abstain from decision if the user has permissions to the selected project.
 

Method Detail

hasPermission

ProjectPermissionOverride.Decision hasPermission(ProjectPermissionKey projectPermissionKey,
                                                 Project project,
                                                 @Nullable
                                                 ApplicationUser applicationUser)
The implementation of this method is supposed to either deny permissions or abstain from decision if the user has permissions to the selected project. It is not allowed to override global permissions and BROWSE permission to the project.

Parameters:
projectPermissionKey - identifier of the project permission.
project - project to which permissions are overridden. This can be null when check is performed for anonymous user.
applicationUser - whose permissions are going to be overriden.
Returns:
the decision.

getReason

ProjectPermissionOverride.Reason getReason(ProjectPermissionKey projectPermissionKey,
                                           Project project,
                                           @Nullable
                                           ApplicationUser applicationUser)
The implementation of this method should return a description explaining how does the permission overriding affects if the user has permissions to the selected project.

Parameters:
projectPermissionKey - identifier of the project permission.
project - project to which permissions are checked.
applicationUser - whose permissions are checked. This can be null when check is performed for anonymous user.
Returns:
the reason.


Copyright © 2002-2014 Atlassian. All Rights Reserved.