public class DefaultAuthorizationSupport extends Object implements AuthorizationSupport
AuthorizationSupport| Constructor and Description |
|---|
DefaultAuthorizationSupport(GlobalPermissionManager globalPermissionManager,
PermissionManager permissionManager,
JiraAuthenticationContext jiraAuthenticationContext) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasGlobalPermission(GlobalPermissionKey globalPermissionKey)
Returns true if the logged in user has the given global permission.
|
boolean |
hasGlobalPermission(String permissionKey)
Returns true if the logged in user has the given global permission.
|
boolean |
hasIssuePermission(int permissionsId,
Issue issue)
Returns true if the logged in user has the given permission type on the given Issue.
|
boolean |
hasIssuePermission(ProjectPermissionKey projectPermissionKey,
Issue issue)
Returns true if the logged in user has the given permission on the given Issue.
|
boolean |
hasIssuePermission(String permissionKey,
Issue issue)
Returns true if the logged in user has the given permission type on the given Issue.
|
boolean |
hasPermission(int permissionsId)
Returns true if the logged in user has the given permission type.
|
boolean |
hasProjectPermission(int permissionsId,
Project project)
Returns true if the logged in user has the given permission type on the given Project.
|
boolean |
hasProjectPermission(ProjectPermissionKey projectPermissionKey,
Project project)
Returns true if the logged in user has the given permission on the given project.
|
public DefaultAuthorizationSupport(GlobalPermissionManager globalPermissionManager, PermissionManager permissionManager, JiraAuthenticationContext jiraAuthenticationContext)
public boolean hasPermission(int permissionsId)
AuthorizationSupporthasPermission in interface AuthorizationSupportpermissionsId - the permission typepublic boolean hasGlobalPermission(GlobalPermissionKey globalPermissionKey)
AuthorizationSupport
This method is intended to be used in Java code. If you are using JSP / Velocity / Soy Templates, it is
probably easier to call AuthorizationSupport.hasGlobalPermission(String) instead.
hasGlobalPermission in interface AuthorizationSupportglobalPermissionKey - the permission to checkAuthorizationSupport.hasGlobalPermission(String)public boolean hasGlobalPermission(String permissionKey)
AuthorizationSupport
This method is intended to be used in JSP / Velocity / Soy Templates. If you are using Java directly, it is
recommended to call AuthorizationSupport.hasGlobalPermission(com.atlassian.jira.permission.GlobalPermissionKey) instead.
Note that this method takes a Global Permission Key, which is a different value to the old "permission name"
that some previous methods would accept - see GlobalPermissionKey for correct values of the system
permissions.
hasGlobalPermission in interface AuthorizationSupportpermissionKey - the permission to checkAuthorizationSupport.hasGlobalPermission(com.atlassian.jira.permission.GlobalPermissionKey)public boolean hasIssuePermission(String permissionKey, Issue issue)
AuthorizationSupportThis method is intended for use in Velocity templates / JSPs etc. Within Java code you should prefer the method that takes a ProjectPermissionKey.
Note that this method takes a Permission Key, which is a different value to the old "permission name" that
some previous methods would accept - see ProjectPermissions for correct
values of the system permissions.
hasIssuePermission in interface AuthorizationSupportpermissionKey - the permission key as a Stringissue - the IssueAuthorizationSupport.hasIssuePermission(com.atlassian.jira.security.plugin.ProjectPermissionKey, com.atlassian.jira.issue.Issue)public boolean hasIssuePermission(int permissionsId,
Issue issue)
AuthorizationSupporthasIssuePermission in interface AuthorizationSupportpermissionsId - the permission typeissue - the Issuepublic boolean hasIssuePermission(ProjectPermissionKey projectPermissionKey, Issue issue)
AuthorizationSupporthasIssuePermission in interface AuthorizationSupportprojectPermissionKey - the permission to checkissue - the IssueAuthorizationSupport.hasIssuePermission(String, com.atlassian.jira.issue.Issue)public boolean hasProjectPermission(int permissionsId,
Project project)
AuthorizationSupporthasProjectPermission in interface AuthorizationSupportpermissionsId - the permission typeproject - the Projectpublic boolean hasProjectPermission(ProjectPermissionKey projectPermissionKey, Project project)
AuthorizationSupporthasProjectPermission in interface AuthorizationSupportprojectPermissionKey - the permission to checkproject - the projectCopyright © 2002-2019 Atlassian. All Rights Reserved.