summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-14 12:09:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-14 12:09:26 +0000
commit2e4c4055181eec9186458dd5dd3219c937032ec7 (patch)
treeeee59e7124ffcf093f1b53369436c69cfe4d9cc5 /app/controllers
parent97f0ae7454597105a27df65ffb772949d9d4f3cb (diff)
downloadgitlab-ce-2e4c4055181eec9186458dd5dd3219c937032ec7.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/import/jira_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/import/jira_controller.rb b/app/controllers/projects/import/jira_controller.rb
index ca427928d85..26d9b4b223f 100644
--- a/app/controllers/projects/import/jira_controller.rb
+++ b/app/controllers/projects/import/jira_controller.rb
@@ -3,14 +3,18 @@
module Projects
module Import
class JiraController < Projects::ApplicationController
+ before_action :authenticate_user!
+ before_action :check_issues_available!
+ before_action :authorize_read_project!
before_action :jira_import_enabled?
before_action :jira_integration_configured?
+ before_action :authorize_admin_project!, only: [:import]
def show
@is_jira_configured = @project.jira_service.present?
return if Feature.enabled?(:jira_issue_import_vue, @project)
- unless @project.latest_jira_import&.in_progress?
+ if !@project.latest_jira_import&.in_progress? && current_user&.can?(:admin_project, @project)
jira_client = @project.jira_service.client
jira_projects = jira_client.Project.all