com.atlassian.greenhopper.service
Class PermissionServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.PermissionServiceImpl
All Implemented Interfaces:
PermissionService

@Service(value="gh-permissionService")
public class PermissionServiceImpl
extends java.lang.Object
implements PermissionService

PermissionService implementation


Field Summary
 
Fields inherited from interface com.atlassian.greenhopper.service.PermissionService
SERVICE
 
Constructor Summary
PermissionServiceImpl()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionServiceImpl

public PermissionServiceImpl()
Method Detail

hasPermission

public boolean hasPermission(com.atlassian.crowd.embedded.api.User user,
                             com.atlassian.jira.issue.Issue issue,
                             int permission)
Description copied from interface: PermissionService
Has the user a certain right for a given issue

Specified by:
hasPermission in interface PermissionService

hasPermission

public boolean hasPermission(com.atlassian.crowd.embedded.api.User user,
                             com.atlassian.jira.project.Project project,
                             int permission)
Description copied from interface: PermissionService
Has the user a certain right for a given project.

Specified by:
hasPermission in interface PermissionService
Returns:
true if the user has the requested right.

hasGlobalPermission

public boolean hasGlobalPermission(com.atlassian.crowd.embedded.api.User user,
                                   int permission)
Description copied from interface: PermissionService
Has the user a global permission

Specified by:
hasGlobalPermission in interface PermissionService
Returns:
true if the user has the requested global permission

isProjectAdministrator

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

Specified by:
isProjectAdministrator in interface PermissionService

isAllProjectsAdministrator

public boolean isAllProjectsAdministrator(com.atlassian.crowd.embedded.api.User user)
Description copied from interface: PermissionService
Is the user a project admin for all projects

Specified by:
isAllProjectsAdministrator in interface PermissionService

isJiraAdministrator

public boolean isJiraAdministrator(com.atlassian.crowd.embedded.api.User user)
Description copied from interface: PermissionService
Check if the user is having Admin permission on the JIRA instance

Specified by:
isJiraAdministrator in interface PermissionService

isJiraSystemAdministrator

public boolean isJiraSystemAdministrator(com.atlassian.crowd.embedded.api.User user)
Description copied from interface: PermissionService
Check if the user is having System Administrator permission on the JIRA instance

Specified by:
isJiraSystemAdministrator in interface PermissionService

canUpdateIssue

public boolean canUpdateIssue(com.atlassian.crowd.embedded.api.User user,
                              com.atlassian.jira.issue.Issue issue)
Description copied from interface: PermissionService
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.

Specified by:
canUpdateIssue in interface PermissionService


Copyright © 2007-2012 Atlassian. All Rights Reserved.