Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
36b00195
Commit
36b00195
authored
Jul 15, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent non-admins from configuring Jira connect app
Changelog: security
parent
e60fa82f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
app/controllers/jira_connect/app_descriptor_controller.rb
app/controllers/jira_connect/app_descriptor_controller.rb
+7
-1
spec/controllers/jira_connect/app_descriptor_controller_spec.rb
...ontrollers/jira_connect/app_descriptor_controller_spec.rb
+4
-1
No files found.
app/controllers/jira_connect/app_descriptor_controller.rb
View file @
36b00195
...
@@ -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
}
]
}
}
}
}
...
...
spec/controllers/jira_connect/app_descriptor_controller_spec.rb
View file @
36b00195
...
@@ -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:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment