Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristiaan Van den Poel <christiaan.vandenpoel@gmail.com>2018-01-08 12:06:25 +0300
committerPhil Hughes <me@iamphill.com>2018-01-08 12:06:25 +0300
commit66ebb206b09f83288ee6acbd6d11b2963ae43c9b (patch)
tree7447b9e0647bebbe0eb5a59af0f068a35ce11e25 /app/controllers/projects/application_controller.rb
parent15f7f52b4034d4ede3b923e95df6884f36194245 (diff)
disables the shortcut to the issue boards when issues are disabled
Diffstat (limited to 'app/controllers/projects/application_controller.rb')
-rw-r--r--app/controllers/projects/application_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb
index 9e79852e378..6025a40348b 100644
--- a/app/controllers/projects/application_controller.rb
+++ b/app/controllers/projects/application_controller.rb
@@ -86,4 +86,8 @@ class Projects::ApplicationController < ApplicationController
def require_pages_enabled!
not_found unless @project.pages_available?
end
+
+ def check_issues_available!
+ return render_404 unless @project.feature_available?(:issues, current_user)
+ end
end