com.atlassian.jira.security
Class Permissions

java.lang.Object
  extended by com.atlassian.jira.security.Permissions

public final class Permissions
extends Object


Nested Class Summary
static class Permissions.Permission
          Experimental API, do not use, it may change without notice...
static class Permissions.Type
          Extremely Experimental API, do not use, it may change without notice...
 
Field Summary
static int ADMINISTER
          Permission to administer JIRA
static int ASSIGN_ISSUE
          Permission to assign issues to other users.
static int ASSIGNABLE_USER
          Permission to be assigned issues.
static int ATTACHMENT_DELETE_ALL
          Permission to delete all attachments
static int ATTACHMENT_DELETE_OWN
          Permission to delete own attachments
static int BROWSE
          Permission to browse projects and issues.
static int BULK_CHANGE
          Permission to modify a collection of issues (global)
static int CLOSE_ISSUE
          Permission to close issues.
static int COMMENT_DELETE_ALL
          Permission to delete all comments
static int COMMENT_DELETE_OWN
          Permission to delete own comments
static int COMMENT_EDIT_ALL
          Permission to modify all comments
static int COMMENT_EDIT_OWN
          Permission to modify only your own comments
static int COMMENT_ISSUE
          Permission to comment on issues
static int CREATE_ATTACHMENT
          Permission to create attachments.
static int CREATE_ISSUE
          Permission to create issues.
static int CREATE_SHARED_OBJECTS
          Permission to created shared objects
static int DELETE_ISSUE
          Permission to delete issues and comments.
static int EDIT_ISSUE
          Permission to edit issues.
static int LINK_ISSUE
          Permission to link issues together and create linked issues.
static int MANAGE_GROUP_FILTER_SUBSCRIPTIONS
          Permission to manage group filter subscriptions
static int MANAGE_WATCHER_LIST
           
static int MAX_PERMISSION
          Deprecated. Do not use MAX_PERMISSION - it is unsafe due to the way that Java compiles constant ints, and no longer relevant. Since v6.2.3
static int MODIFY_REPORTER
           
static int MOVE_ISSUE
          Permission to move issues between projects
static int PROJECT_ADMIN
          Permission to administer a Project
static int RESOLVE_ISSUE
          Permission to resolve issues.
static int SCHEDULE_ISSUE
           
static int SET_ISSUE_SECURITY
           
static int SYSTEM_ADMIN
          Permission to be a System Admin of JIRA
static int TRANSITION_ISSUE
          Permission to perform workflow action (transition).
static int USE
          Permission to use JIRA
static int USER_PICKER
           
static int VIEW_VERSION_CONTROL
           
static int VIEW_VOTERS_AND_WATCHERS
           
static int VIEW_WORKFLOW_READONLY
           
static int WORK_ISSUE
          Permission to log work done on an issue.
static int WORKLOG_DELETE_ALL
           
static int WORKLOG_DELETE_OWN
           
static int WORKLOG_EDIT_ALL
           
static int WORKLOG_EDIT_OWN
          Permission to edit/remove worklogs
 
Constructor Summary
Permissions()
           
 
Method Summary
static String getDescription(int permType)
          Get the description of a permission.
static String getShortName(int id)
           
static int getType(String permName)
          Given a string approximation, try to guess the type If permName is null then -1 is returned If the permName is not recognised then -1 is returned
static Set<Integer> getUsePermissions()
          Deprecated. Please use GlobalPermissionType.getUsePermissions() instead.
static boolean isAdministrativePermission(int permType)
           
static boolean isGlobalPermission(int permType)
          Deprecated. This method is a shim. call GlobalPermissionManager.isGlobalPermission(int) instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADMINISTER

public static final int ADMINISTER
Permission to administer JIRA

See Also:
Constant Field Values

USE

public static final int USE
Permission to use JIRA

See Also:
Constant Field Values

SYSTEM_ADMIN

public static final int SYSTEM_ADMIN
Permission to be a System Admin of JIRA

See Also:
Constant Field Values

PROJECT_ADMIN

public static final int PROJECT_ADMIN
Permission to administer a Project

See Also:
Constant Field Values

BROWSE

public static final int BROWSE
Permission to browse projects and issues.

This includes filtering using the Issue Navigator.

See Also:
Constant Field Values

CREATE_ISSUE

public static final int CREATE_ISSUE
Permission to create issues.

See Also:
Constant Field Values

EDIT_ISSUE

public static final int EDIT_ISSUE
Permission to edit issues.

This includes managing attachments and adding them.

See Also:
Constant Field Values

ASSIGN_ISSUE

public static final int ASSIGN_ISSUE
Permission to assign issues to other users.

See Also:
Constant Field Values

RESOLVE_ISSUE

public static final int RESOLVE_ISSUE
Permission to resolve issues.

See Also:
Constant Field Values

COMMENT_ISSUE

public static final int COMMENT_ISSUE
Permission to comment on issues

See Also:
Constant Field Values

DELETE_ISSUE

public static final int DELETE_ISSUE
Permission to delete issues and comments.

See Also:
Constant Field Values

ASSIGNABLE_USER

public static final int ASSIGNABLE_USER
Permission to be assigned issues.

See Also:
Constant Field Values

CLOSE_ISSUE

public static final int CLOSE_ISSUE
Permission to close issues.

See Also:
Constant Field Values

TRANSITION_ISSUE

@ExperimentalApi
public static final int TRANSITION_ISSUE
Permission to perform workflow action (transition).

For 6.2.x release it's partially used. It was introduced for veto transition but the actual permission check is performed against the BROWSE permission. This permission is not visible in UI or REST.

In 6.3 release this will be full-fledged permission.

Since:
6.2.2
See Also:
Constant Field Values

CREATE_ATTACHMENT

public static final int CREATE_ATTACHMENT
Permission to create attachments.

See Also:
Constant Field Values

WORK_ISSUE

public static final int WORK_ISSUE
Permission to log work done on an issue.

See Also:
Constant Field Values

LINK_ISSUE

public static final int LINK_ISSUE
Permission to link issues together and create linked issues.

See Also:
Constant Field Values

CREATE_SHARED_OBJECTS

public static final int CREATE_SHARED_OBJECTS
Permission to created shared objects

See Also:
Constant Field Values

MANAGE_GROUP_FILTER_SUBSCRIPTIONS

public static final int MANAGE_GROUP_FILTER_SUBSCRIPTIONS
Permission to manage group filter subscriptions

See Also:
Constant Field Values

COMMENT_EDIT_ALL

public static final int COMMENT_EDIT_ALL
Permission to modify all comments

See Also:
Constant Field Values

COMMENT_EDIT_OWN

public static final int COMMENT_EDIT_OWN
Permission to modify only your own comments

See Also:
Constant Field Values

MOVE_ISSUE

public static final int MOVE_ISSUE
Permission to move issues between projects

See Also:
Constant Field Values

SET_ISSUE_SECURITY

public static final int SET_ISSUE_SECURITY
See Also:
Constant Field Values

USER_PICKER

public static final int USER_PICKER
See Also:
Constant Field Values

SCHEDULE_ISSUE

public static final int SCHEDULE_ISSUE
See Also:
Constant Field Values

VIEW_VERSION_CONTROL

public static final int VIEW_VERSION_CONTROL
See Also:
Constant Field Values

MODIFY_REPORTER

public static final int MODIFY_REPORTER
See Also:
Constant Field Values

VIEW_VOTERS_AND_WATCHERS

public static final int VIEW_VOTERS_AND_WATCHERS
See Also:
Constant Field Values

MANAGE_WATCHER_LIST

public static final int MANAGE_WATCHER_LIST
See Also:
Constant Field Values

BULK_CHANGE

public static final int BULK_CHANGE
Permission to modify a collection of issues (global)

See Also:
Constant Field Values

COMMENT_DELETE_ALL

public static final int COMMENT_DELETE_ALL
Permission to delete all comments

See Also:
Constant Field Values

COMMENT_DELETE_OWN

public static final int COMMENT_DELETE_OWN
Permission to delete own comments

See Also:
Constant Field Values

ATTACHMENT_DELETE_ALL

public static final int ATTACHMENT_DELETE_ALL
Permission to delete all attachments

See Also:
Constant Field Values

ATTACHMENT_DELETE_OWN

public static final int ATTACHMENT_DELETE_OWN
Permission to delete own attachments

See Also:
Constant Field Values

WORKLOG_EDIT_OWN

public static final int WORKLOG_EDIT_OWN
Permission to edit/remove worklogs

See Also:
Constant Field Values

WORKLOG_EDIT_ALL

public static final int WORKLOG_EDIT_ALL
See Also:
Constant Field Values

WORKLOG_DELETE_OWN

public static final int WORKLOG_DELETE_OWN
See Also:
Constant Field Values

WORKLOG_DELETE_ALL

public static final int WORKLOG_DELETE_ALL
See Also:
Constant Field Values

VIEW_WORKFLOW_READONLY

public static final int VIEW_WORKFLOW_READONLY
See Also:
Constant Field Values

MAX_PERMISSION

@Deprecated
public static final int MAX_PERMISSION
Deprecated. Do not use MAX_PERMISSION - it is unsafe due to the way that Java compiles constant ints, and no longer relevant. Since v6.2.3
This constant should not be used for a number of reasons.

See Also:
Constant Field Values
Constructor Detail

Permissions

public Permissions()
Method Detail

getUsePermissions

public static Set<Integer> getUsePermissions()
Deprecated. Please use GlobalPermissionType.getUsePermissions() instead.

Returns a Set of all the permissions that grant a user the permission to log into JIRA (i.e. 'Use' JIRA).

Returns:
A set containing all the permissions or an empty set otherwise
Since:
3.13

getType

public static int getType(String permName)
Given a string approximation, try to guess the type If permName is null then -1 is returned If the permName is not recognised then -1 is returned

Parameters:
permName - permission name
Returns:
permission type

getShortName

public static String getShortName(int id)

getDescription

public static String getDescription(int permType)
Get the description of a permission.

Returns an empty string if the permission with given type cannot be found.

Parameters:
permType - permission type
Returns:
description of a permission

isGlobalPermission

public static boolean isGlobalPermission(int permType)
Deprecated. This method is a shim. call GlobalPermissionManager.isGlobalPermission(int) instead.


isAdministrativePermission

public static boolean isAdministrativePermission(int permType)
Parameters:
permType - permission Type
Returns:
true if the permission type is a SYSTEM_ADMIN or a has ADMINISTER privileges


Copyright © 2002-2014 Atlassian. All Rights Reserved.