public final class

Permissions

extends Object
java.lang.Object
   ↳ com.atlassian.jira.security.Permissions

Summary

Nested Classes
enum Permissions.Permission Experimental API, do not use, it may change without notice... 
enum Permissions.Type Extremely Experimental API, do not use, it may change without notice... 
Constants
int ADMINISTER Permission to administer JIRA
int ASSIGNABLE_USER Permission to be assigned issues.
int ASSIGN_ISSUE Permission to assign issues to other users.
int ATTACHMENT_DELETE_ALL Permission to delete all attachments
int ATTACHMENT_DELETE_OWN Permission to delete own attachments
int BROWSE Permission to browse projects and issues.
int BULK_CHANGE Permission to modify a collection of issues (global)
int CLOSE_ISSUE Permission to close issues.
int COMMENT_DELETE_ALL Permission to delete all comments
int COMMENT_DELETE_OWN Permission to delete own comments
int COMMENT_EDIT_ALL Permission to modify all comments
int COMMENT_EDIT_OWN Permission to modify only your own comments
int COMMENT_ISSUE Permission to comment on issues
int CREATE_ATTACHMENT Permission to create attachments.
int CREATE_ISSUE Permission to create issues.
int CREATE_SHARED_OBJECTS Permission to created shared objects
int DELETE_ISSUE Permission to delete issues and comments.
int EDIT_ISSUE Permission to edit issues.
int LINK_ISSUE Permission to link issues together and create linked issues.
int MANAGE_GROUP_FILTER_SUBSCRIPTIONS Permission to manage group filter subscriptions
int MANAGE_WATCHER_LIST
int MAX_PERMISSION
int MODIFY_REPORTER
int MOVE_ISSUE Permission to move issues between projects
int PROJECT_ADMIN Permission to administer a Project
int RESOLVE_ISSUE Permission to resolve issues.
int SCHEDULE_ISSUE
int SET_ISSUE_SECURITY
int SYSTEM_ADMIN Permission to be a System Admin of JIRA
int USE Permission to use JIRA
int USER_PICKER
int VIEW_VERSION_CONTROL
int VIEW_VOTERS_AND_WATCHERS
int VIEW_WORKFLOW_READONLY
int WORKLOG_DELETE_ALL
int WORKLOG_DELETE_OWN
int WORKLOG_EDIT_ALL
int WORKLOG_EDIT_OWN Permission to edit/remove worklogs
int WORK_ISSUE Permission to log work done on an issue.
Public Constructors
Permissions()
Public Methods
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()
Returns a Set of all the permissions that grant a user the permission to log into JIRA (i.e.
static boolean isAdministrativePermission(int permType)
static boolean isGlobalPermission(int permType)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ADMINISTER

Permission to administer JIRA

Constant Value: 0 (0x00000000)

public static final int ASSIGNABLE_USER

Permission to be assigned issues.

Constant Value: 17 (0x00000011)

public static final int ASSIGN_ISSUE

Permission to assign issues to other users.

Constant Value: 13 (0x0000000d)

public static final int ATTACHMENT_DELETE_ALL

Permission to delete all attachments

Constant Value: 38 (0x00000026)

public static final int ATTACHMENT_DELETE_OWN

Permission to delete own attachments

Constant Value: 39 (0x00000027)

public static final int BROWSE

Permission to browse projects and issues.

This includes filtering using the Issue Navigator.

Constant Value: 10 (0x0000000a)

public static final int BULK_CHANGE

Permission to modify a collection of issues (global)

Constant Value: 33 (0x00000021)

public static final int CLOSE_ISSUE

Permission to close issues.

Constant Value: 18 (0x00000012)

public static final int COMMENT_DELETE_ALL

Permission to delete all comments

Constant Value: 36 (0x00000024)

public static final int COMMENT_DELETE_OWN

Permission to delete own comments

Constant Value: 37 (0x00000025)

public static final int COMMENT_EDIT_ALL

Permission to modify all comments

Constant Value: 34 (0x00000022)

public static final int COMMENT_EDIT_OWN

Permission to modify only your own comments

Constant Value: 35 (0x00000023)

public static final int COMMENT_ISSUE

Permission to comment on issues

Constant Value: 15 (0x0000000f)

public static final int CREATE_ATTACHMENT

Permission to create attachments.

Constant Value: 19 (0x00000013)

public static final int CREATE_ISSUE

Permission to create issues.

Constant Value: 11 (0x0000000b)

public static final int CREATE_SHARED_OBJECTS

Permission to created shared objects

Constant Value: 22 (0x00000016)

public static final int DELETE_ISSUE

Permission to delete issues and comments.

Constant Value: 16 (0x00000010)

public static final int EDIT_ISSUE

Permission to edit issues.

This includes managing attachments and adding them.

Constant Value: 12 (0x0000000c)

public static final int LINK_ISSUE

Permission to link issues together and create linked issues.

Constant Value: 21 (0x00000015)

public static final int MANAGE_GROUP_FILTER_SUBSCRIPTIONS

Permission to manage group filter subscriptions

Constant Value: 24 (0x00000018)

public static final int MANAGE_WATCHER_LIST

Constant Value: 32 (0x00000020)

public static final int MAX_PERMISSION

Constant Value: 45 (0x0000002d)

public static final int MODIFY_REPORTER

Constant Value: 30 (0x0000001e)

public static final int MOVE_ISSUE

Permission to move issues between projects

Constant Value: 25 (0x00000019)

public static final int PROJECT_ADMIN

Permission to administer a Project

Constant Value: 23 (0x00000017)

public static final int RESOLVE_ISSUE

Permission to resolve issues.

Constant Value: 14 (0x0000000e)

public static final int SCHEDULE_ISSUE

Constant Value: 28 (0x0000001c)

public static final int SET_ISSUE_SECURITY

Constant Value: 26 (0x0000001a)

public static final int SYSTEM_ADMIN

Permission to be a System Admin of JIRA

Constant Value: 44 (0x0000002c)

public static final int USE

Permission to use JIRA

Constant Value: 1 (0x00000001)

public static final int USER_PICKER

Constant Value: 27 (0x0000001b)

public static final int VIEW_VERSION_CONTROL

Constant Value: 29 (0x0000001d)

public static final int VIEW_VOTERS_AND_WATCHERS

Constant Value: 31 (0x0000001f)

public static final int VIEW_WORKFLOW_READONLY

Constant Value: 45 (0x0000002d)

public static final int WORKLOG_DELETE_ALL

Constant Value: 43 (0x0000002b)

public static final int WORKLOG_DELETE_OWN

Constant Value: 42 (0x0000002a)

public static final int WORKLOG_EDIT_ALL

Constant Value: 41 (0x00000029)

public static final int WORKLOG_EDIT_OWN

Permission to edit/remove worklogs

Constant Value: 40 (0x00000028)

public static final int WORK_ISSUE

Permission to log work done on an issue.

Constant Value: 20 (0x00000014)

Public Constructors

public Permissions ()

Public Methods

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

public static String getShortName (int id)

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

public static Set<Integer> getUsePermissions ()

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

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

public static boolean isGlobalPermission (int permType)