com.atlassian.jira.rest.v2.permission
Class PermissionsResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.permission.PermissionsResource

public class PermissionsResource
extends Object

Provide permission information for the current user.

Since:
v5.0

Constructor Summary
PermissionsResource(PermissionManager permissionManager, JiraAuthenticationContext jiraAuthenticationContext, GlobalPermissionManager globalPermissionManager, ProjectManager projectManager, IssueManager issueManager)
           
 
Method Summary
 javax.ws.rs.core.Response getPermissions(String projectKey, String projectId, String issueKey, String issueId)
          Returns all permissions in the system and whether the currently logged in user has them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionsResource

public PermissionsResource(PermissionManager permissionManager,
                           JiraAuthenticationContext jiraAuthenticationContext,
                           GlobalPermissionManager globalPermissionManager,
                           ProjectManager projectManager,
                           IssueManager issueManager)
Method Detail

getPermissions

public javax.ws.rs.core.Response getPermissions(String projectKey,
                                                String projectId,
                                                String issueKey,
                                                String issueId)
Returns all permissions in the system and whether the currently logged in user has them. You can optionally provide a specific context to get permissions for (projectKey OR projectId OR issueKey OR issueId)

NB: The above means that for issue-level permissions (EDIT_ISSUE for example), hasPermission may be true when no context is provided, or when a project context is provided, but may be false for any given (or all) issues. This would occur (for example) if Reporters were given the EDIT_ISSUE permission. This is because any user could be a reporter, except in the context of a concrete issue, where the reporter is known.

Global permissions will still be returned for all scopes.

Parameters:
projectKey - - key of project to scope returned permissions for.
projectId - - id of project to scope returned permissions for.
issueKey - - key of the issue to scope returned permissions for.
issueId - - id of the issue to scope returned permissions for.
Returns:
all permissions and whether the currently logged in user has them.
Since:
v5.0


Copyright © 2002-2014 Atlassian. All Rights Reserved.