Issues, MR, Wall can be enabled/disabled per project
This commit is contained in:
parent
da3e34c0fd
commit
6c416aaac8
9 changed files with 116 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue