diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-02-06 19:40:32 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-02-06 19:40:32 +0200 |
| commit | 6c416aaac85fe16cd4900a686714627e9a0fcdbc (patch) | |
| tree | ae08e26029513abe829ea4aea8984b9e7695cf51 /app/controllers/issues_controller.rb | |
| parent | da3e34c0fdc4de47e6192b8d75ce60be7d89b6d4 (diff) | |
| download | gitlab-ce-6c416aaac85fe16cd4900a686714627e9a0fcdbc.tar.gz | |
Issues, MR, Wall can be enabled/disabled per project
Diffstat (limited to 'app/controllers/issues_controller.rb')
| -rw-r--r-- | app/controllers/issues_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 7c10d2a8ef4..ed1a5864f23 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -1,6 +1,7 @@ class IssuesController < ApplicationController before_filter :authenticate_user! before_filter :project + before_filter :module_enabled before_filter :issue, :only => [:edit, :update, :destroy, :show] layout "project" @@ -132,4 +133,8 @@ class IssuesController < ApplicationController def authorize_admin_issue! can?(current_user, :admin_issue, @issue) end + + def module_enabled + return render_404 unless @project.issues_enabled + end end |
