Commit 36b00195 authored by Alex Kalderimis's avatar Alex Kalderimis

Prevent non-admins from configuring Jira connect app

Changelog: security
parent e60fa82f
...@@ -47,7 +47,13 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController ...@@ -47,7 +47,13 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController
postInstallPage: { postInstallPage: {
key: 'gitlab-configuration', key: 'gitlab-configuration',
name: { value: 'GitLab Configuration' }, name: { value: 'GitLab Configuration' },
url: relative_to_base_path(jira_connect_subscriptions_path) url: relative_to_base_path(jira_connect_subscriptions_path),
conditions: [
{
condition: 'user_is_admin',
invert: false
}
]
} }
} }
......
...@@ -54,7 +54,10 @@ RSpec.describe JiraConnect::AppDescriptorController do ...@@ -54,7 +54,10 @@ RSpec.describe JiraConnect::AppDescriptorController do
postInstallPage: { postInstallPage: {
key: 'gitlab-configuration', key: 'gitlab-configuration',
name: { value: 'GitLab Configuration' }, name: { value: 'GitLab Configuration' },
url: '/subscriptions' url: '/subscriptions',
conditions: contain_exactly(
a_hash_including(condition: 'user_is_admin', invert: false)
)
}, },
jiraDevelopmentTool: { jiraDevelopmentTool: {
actions: { actions: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment