Package com.atlassian.jira.security
Class ProjectPermissionPluginVetoChecker
java.lang.Object
com.atlassian.jira.security.ProjectPermissionPluginVetoChecker
-
Constructor Summary
ConstructorsConstructorDescriptionProjectPermissionPluginVetoChecker(ProjectPermissionOverrideDescriptorCache projectPermissionOverrideDescriptorCache) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisVetoed(ProjectPermissionKey permissionKey, Project project, ApplicationUser applicationUser) Check if anyProjectPermissionOverrideimplementations from any installed plugins veto the permission check for the given user on the given project.booleanisVetoedForIssue(ProjectPermissionKey permissionKey, Issue issue, ApplicationUser applicationUser) Check if anyProjectPermissionOverrideimplementations from any installed plugins veto the permission check for the given user on the given issue.
-
Constructor Details
-
ProjectPermissionPluginVetoChecker
public ProjectPermissionPluginVetoChecker(ProjectPermissionOverrideDescriptorCache projectPermissionOverrideDescriptorCache)
-
-
Method Details
-
isVetoed
public boolean isVetoed(ProjectPermissionKey permissionKey, Project project, ApplicationUser applicationUser) Check if anyProjectPermissionOverrideimplementations from any installed plugins veto the permission check for the given user on the given project. Vetoing is defined as any implementation returningProjectPermissionOverride.Decision.DENYfrom itshasPermissionmethod. IfpermissionKeyisProjectPermissions.BROWSE_PROJECTS, the plugins WILL NOT be consulted and this method will always returnfalse.- Parameters:
permissionKey- The permission to checkproject- The project to check againstapplicationUser- The user to check- Returns:
- true if any plugin vetoes the permission check, false otherwise
-
isVetoedForIssue
public boolean isVetoedForIssue(ProjectPermissionKey permissionKey, Issue issue, ApplicationUser applicationUser) Check if anyProjectPermissionOverrideimplementations from any installed plugins veto the permission check for the given user on the given issue. Vetoing is defined as any implementation returningProjectPermissionOverride.Decision.DENYfrom itshasIssuePermissionmethod. UnlikeisVetoed(ProjectPermissionKey, Project, ApplicationUser), ifpermissionKeyisProjectPermissions.BROWSE_PROJECTS, the plugins WILL be consulted and this method may returntrue.- Parameters:
permissionKey- The permission to checkissue- The issue to check againstapplicationUser- The user to check- Returns:
- true if any plugin vetoes the permission check, false otherwise
-