Documentation
Single Condition
Conditions can be added to modules to display them only when all the given conditions are true.
Single Conditions can take optional parameters. These parameters will be passed in to the condition's init() method as a map of string key/value pairs before any condition checks are performed.
To invert a condition, add the attribute invert="true" to the condition element.
This is useful where you want to show the section if a certain condition is not satisfied.
Single Conditions must contain a condition attribute with the name of the condition to check.
The valid condition names are as follows:
CONFLUENCE
active_themecan_edit_space_stylescan_signupcontent_has_any_permissions_setcreate_contentemail_address_publicfavourite_pagefavourite_spacefollowing_target_userhas_attachmenthas_blog_posthas_pagehas_spacehas_templatelatest_versionnot_personal_spaceprintable_versionshowing_page_attachmentsspace_function_permissionspace_sidebartarget_user_can_set_statustarget_user_has_personal_blogtarget_user_has_personal_spacethreaded_commentstiny_url_supporteduser_can_create_personal_spaceuser_can_update_user_statususer_can_use_confluenceuser_favouriting_target_user_personal_spaceuser_has_personal_bloguser_has_personal_spaceuser_is_adminuser_is_confluence_administratoruser_is_logged_inuser_is_sysadminuser_logged_in_editableuser_watching_pageuser_watching_spaceuser_watching_space_for_content_typeviewing_contentviewing_own_profile
JIRA
can_attach_file_to_issuecan_attach_screenshot_to_issuecan_manage_attachmentshas_issue_permissionhas_project_permissionhas_selected_projecthas_sub_tasks_availablehas_voted_for_issueis_admin_modeis_issue_assigned_to_current_useris_issue_editableis_issue_reported_by_current_useris_issue_unresolvedis_sub_taskis_watching_issuelinking_enabledsub_tasks_enabledtime_tracking_enableduser_has_issue_historyuser_is_adminuser_is_logged_inuser_is_project_adminuser_is_sysadminuser_is_the_logged_in_uservoting_enabledwatching_enabled
JIRA condition parameter mappings
The following table shows the condition parameters available for has_issue_permission and has_project_permission in Atlassian Connect module declarations and how they map to the permissions described in the Permissions class documentation.
| JIRA condition parameters | Atlassian Connect equivalent |
|---|---|
| ADMINISTER | admin |
| USE | use |
| SYSTEM_ADMIN | sysadmin |
| PROJECT_ADMIN | project |
| BROWSE | browse |
| CREATE_ISSUE | create |
| EDIT_ISSUE | edit |
| EDIT_ISSUE | update |
| SCHEDULE_ISSUE | scheduleissue |
| ASSIGNABLE_USER | assignable |
| ASSIGN_ISSUE | assign |
| RESOLVE_ISSUE | resolv |
| CLOSE_ISSUE | close |
| WORKLOG_EDIT_ALL | worklogeditall |
| WORKLOG_EDIT_OWN | worklogeditown |
| WORKLOG_DELETE_OWN | worklogdeleteown |
| WORKLOG_DELETE_ALL | worklogdeleteall |
| WORK_ISSUE | work |
| LINK_ISSUE | link |
| DELETE_ISSUE | delete |
| CREATE_SHARED_OBJECTS | sharefilters |
| MANAGE_GROUP_FILTER_SUBSCRIPTIONS | groupsubscriptions |
| MOVE_ISSUE | move |
| SET_ISSUE_SECURITY | setsecurity |
| USER_PICKER | pickusers |
| VIEW_VERSION_CONTROL | viewversioncontrol |
| MODIFY_REPORTER | modifyreporter |
| VIEW_VOTERS_AND_WATCHERS | viewvotersandwatchers |
| MANAGE_WATCHER_LIST | managewatcherlist |
| BULK_CHANGE | bulkchange |
| COMMENT_EDIT_ALL | commenteditall |
| COMMENT_EDIT_OWN | commenteditown |
| COMMENT_DELETE_OWN | commentdeleteown |
| COMMENT_DELETE_ALL | commentdeleteall |
| ATTACHMENT_DELETE_OWN | attachdeleteown |
| ATTACHMENT_DELETE_ALL | attachdeleteall |
| CREATE_ATTACHMENT | attach |
| COMMENT_ISSUE | comment |
| VIEW_WORKFLOW_READONLY | viewworkflowreadonly |
Example
{
"condition": {
"condition": "user_is_logged_in",
"invert": false
}
}
Properties
condition
Type
stringRequired
invert
Type
booleanDefaults to
falseparams
Type
objectDescription
This object represents a map of key/value pairs, where each property name and value corresponds to the parameter name and value respectively.
Example
{
"params": {
"someOtherProperty": "someValue",
"myCustomProperty": "myValue"
}
}