diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-06-13 10:25:25 +0200 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-07-24 08:10:14 +0200 |
commit | 2fa22a07296223c1239bfab94654487cca222097 (patch) | |
tree | cf930855ad24ad2770a832d530e5a5ae36719825 /app/controllers/projects | |
parent | b92d5135d8522e1370636799d74b51f9a37d0b2f (diff) | |
download | gitlab-ce-2fa22a07296223c1239bfab94654487cca222097.tar.gz |
Associate Issues tab only with internal issues tracker
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 0ac9da2ff0f..5b0eeac2477 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -8,7 +8,6 @@ class Projects::IssuesController < Projects::ApplicationController prepend_before_action :authenticate_user!, only: [:new] - before_action :redirect_to_external_issue_tracker, only: [:index, :new] before_action :check_issues_available! before_action :issue, except: [:index, :new, :create, :bulk_update] @@ -243,19 +242,19 @@ class Projects::IssuesController < Projects::ApplicationController end def authorize_update_issue! - return render_404 unless can?(current_user, :update_issue, @issue) + render_404 unless can?(current_user, :update_issue, @issue) end def authorize_admin_issues! - return render_404 unless can?(current_user, :admin_issue, @project) + render_404 unless can?(current_user, :admin_issue, @project) end def authorize_create_merge_request! - return render_404 unless can?(current_user, :push_code, @project) && @issue.can_be_worked_on?(current_user) + render_404 unless can?(current_user, :push_code, @project) && @issue.can_be_worked_on?(current_user) end def check_issues_available! - return render_404 unless @project.feature_available?(:issues, current_user) && @project.default_issues_tracker? + return render_404 unless @project.feature_available?(:issues, current_user) end def redirect_to_external_issue_tracker @@ -270,6 +269,10 @@ class Projects::IssuesController < Projects::ApplicationController end end + def module_enabled + render_404 unless @project.feature_available?(:issues, current_user) + end + def issue_params params.require(:issue).permit(*issue_params_attributes) end |