com.atlassian.greenhopper.service
Interface PermissionService

All Known Implementing Classes:
PermissionServiceImpl

public interface PermissionService

Provides permission check methods used through GreenHopper

Author:
miruflin

Field Summary
static java.lang.String SERVICE
          Service identifier to be used for dependency injection.
 
Method Summary
 boolean canUpdateIssue(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue issue)
          Check if the user is allowed to save changes to the issue.
 boolean hasGlobalPermission(com.atlassian.crowd.embedded.api.User user, int permission)
          Has the user a global permission
 boolean hasPermission(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue issue, int permission)
          Has the user a certain right for a given issue
 boolean hasPermission(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.project.Project project, int permission)
          Has the user a certain right for a given project.
 boolean isAllProjectsAdministrator(com.atlassian.crowd.embedded.api.User user)
          Is the user a project admin for all projects
 boolean isJiraAdministrator(com.atlassian.crowd.embedded.api.User user)
          Check if the user is having Admin permission on the JIRA instance
 boolean isJiraSystemAdministrator(com.atlassian.crowd.embedded.api.User user)
          Check if the user is having System Administrator permission on the JIRA instance
 boolean isProjectAdministrator(com.atlassian.crowd.embedded.api.User user, java.util.Collection<com.atlassian.jira.project.Project> projects)
          Check if the user is having the project administrator role for all given projects
 

Field Detail

SERVICE

static final java.lang.String SERVICE
Service identifier to be used for dependency injection.

See Also:
Constant Field Values
Method Detail

hasPermission

boolean hasPermission(com.atlassian.crowd.embedded.api.User user,
                      com.atlassian.jira.issue.Issue issue,
                      int permission)
Has the user a certain right for a given issue


hasPermission

boolean hasPermission(com.atlassian.crowd.embedded.api.User user,
                      com.atlassian.jira.project.Project project,
                      int permission)
Has the user a certain right for a given project.

Returns:
true if the user has the requested right.

hasGlobalPermission

boolean hasGlobalPermission(com.atlassian.crowd.embedded.api.User user,
                            int permission)
Has the user a global permission

Returns:
true if the user has the requested global permission

isProjectAdministrator

boolean isProjectAdministrator(com.atlassian.crowd.embedded.api.User user,
                               java.util.Collection<com.atlassian.jira.project.Project> projects)
Check if the user is having the project administrator role for all given projects


isAllProjectsAdministrator

boolean isAllProjectsAdministrator(com.atlassian.crowd.embedded.api.User user)
Is the user a project admin for all projects


isJiraAdministrator

boolean isJiraAdministrator(com.atlassian.crowd.embedded.api.User user)
Check if the user is having Admin permission on the JIRA instance


isJiraSystemAdministrator

boolean isJiraSystemAdministrator(com.atlassian.crowd.embedded.api.User user)
Check if the user is having System Administrator permission on the JIRA instance


canUpdateIssue

boolean canUpdateIssue(com.atlassian.crowd.embedded.api.User user,
                       com.atlassian.jira.issue.Issue issue)
Check if the user is allowed to save changes to the issue. Only checks for permissions, and not if the issue is editable from a workflow perspective.



Copyright © 2007-2012 Atlassian. All Rights Reserved.