admGetPermissionsFromScheme

Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8 for Server/Data Center? Click here !

Availability

This routine is available starting with SIL Engine 4.8.0.8.

Syntax

admGetPermissionsFromScheme(permissionSchemeName)

Description

Retrieves a list of actions and corresponding permissions for a given Permission Scheme.

Parameter name

Type

Required

Description

permissionSchemeName

string

true

The name of screen screen used to retrieve the underlying configurations.

Parameters

Return type

JGeneric[] (array of JGenerics)

Returns an array of key/value pairs representing the values of a Permission Scheme, where the key is the permission and the value is the associated permission grants for each permission.

Each value can be composed of multiple permission grant values separated by "|". Each permission grant is composed of an id and a type. The type will be in parentheses.

Examples:  

  • 10002 (projectrole)
  • jira-servicedesk (applicationRole)
  • jira-software-users (group)
  • jsmith (user)

Example

JGeneric[] permissions = admGetPermissionsFromScheme("Default Permission Scheme");
return permissions;


// String representation
// ADD_COMMENTS||ADMINISTER_PROJECTS|10002 (projectrole)|ASSIGNABLE_USER||ASSIGN_ISSUES||BROWSE_PROJECTS|jira-servicedesk (applicationRole)|jira-software-users (group)|jsmith (user)|CLOSE_ISSUES||CREATE_ATTACHMENTS||CREATE_ISSUES||DELETE_ALL_ATTACHMENTS|10002 (projectrole)|DELETE_ALL_COMMENTS|10002 (projectrole)|DELETE_ALL_WORKLOGS|10002 (projectrole)|DELETE_ISSUES|10002 (projectrole)|DELETE_OWN_ATTACHMENTS||DELETE_OWN_COMMENTS||DELETE_OWN_WORKLOGS||EDIT_ALL_COMMENTS|10002 (projectrole)|EDIT_ALL_WORKLOGS|10002 (projectrole)|EDIT_ISSUES||EDIT_OWN_COMMENTS||EDIT_OWN_WORKLOGS||LINK_ISSUES||MANAGE_SPRINTS_PERMISSION||MANAGE_WATCHERS|10002 (projectrole)|MODIFY_REPORTER|10002 (projectrole)|MOVE_ISSUES||PROJECT_LOG_WORK_FOR_OTHERS||PROJECT_VIEW_ALL_WORKLOGS|10400 (projectrole)|RESOLVE_ISSUES||SCHEDULE_ISSUES||SERVICEDESK_AGENT||SET_ISSUE_SECURITY|10002 (projectrole)|TRANSITION_ISSUES||VIEW_DEV_TOOLS||VIEW_READONLY_WORKFLOW||VIEW_VOTERS_AND_WATCHERS||WORK_ON_ISSUES|

// JSON representation
/*
[{
	"name": "ADD_COMMENTS",
	"value": null
}, {
	"name": "ADMINISTER_PROJECTS",
	"value": "10002 (projectrole)"
}, {
	"name": "ASSIGNABLE_USER",
	"value": null
}, {
	"name": "ASSIGN_ISSUES",
	"value": null
}, {
	"name": "BROWSE_PROJECTS",
	"value": "jira-servicedesk (applicationRole)|jira-software-users (group)|jsmith (user)"
}, {
	"name": "CLOSE_ISSUES",
	"value": null
}, {
	"name": "CREATE_ATTACHMENTS",
	"value": null
}, {
	"name": "CREATE_ISSUES",
	"value": null
}, {
	"name": "DELETE_ALL_ATTACHMENTS",
	"value": "10002 (projectrole)"
}, {
	"name": "DELETE_ALL_COMMENTS",
	"value": "10002 (projectrole)"
}, {
	"name": "DELETE_ALL_WORKLOGS",
	"value": "10002 (projectrole)"
}, {
	"name": "DELETE_ISSUES",
	"value": "10002 (projectrole)"
}, {
	"name": "DELETE_OWN_ATTACHMENTS",
	"value": null
}, {
	"name": "DELETE_OWN_COMMENTS",
	"value": null
}, {
	"name": "DELETE_OWN_WORKLOGS",
	"value": null
}, {
	"name": "EDIT_ALL_COMMENTS",
	"value": "10002 (projectrole)"
}, {
	"name": "EDIT_ALL_WORKLOGS",
	"value": "10002 (projectrole)"
}, {
	"name": "EDIT_ISSUES",
	"value": null
}, {
	"name": "EDIT_OWN_COMMENTS",
	"value": null
}, {
	"name": "EDIT_OWN_WORKLOGS",
	"value": null
}, {
	"name": "LINK_ISSUES",
	"value": null
}, {
	"name": "MANAGE_SPRINTS_PERMISSION",
	"value": null
}, {
	"name": "MANAGE_WATCHERS",
	"value": "10002 (projectrole)"
}, {
	"name": "MODIFY_REPORTER",
	"value": "10002 (projectrole)"
}, {
	"name": "MOVE_ISSUES",
	"value": null
}, {
	"name": "PROJECT_LOG_WORK_FOR_OTHERS",
	"value": null
}, {
	"name": "PROJECT_VIEW_ALL_WORKLOGS",
	"value": "10400 (projectrole)"
}, {
	"name": "RESOLVE_ISSUES",
	"value": null
}, {
	"name": "SCHEDULE_ISSUES",
	"value": null
}, {
	"name": "SERVICEDESK_AGENT",
	"value": null
}, {
	"name": "SET_ISSUE_SECURITY",
	"value": "10002 (projectrole)"
}, {
	"name": "TRANSITION_ISSUES",
	"value": null
}, {
	"name": "VIEW_DEV_TOOLS",
	"value": null
}, {
	"name": "VIEW_READONLY_WORKFLOW",
	"value": null
}, {
	"name": "VIEW_VOTERS_AND_WATCHERS",
	"value": null
}, {
	"name": "WORK_ON_ISSUES",
	"value": null
}]
*/