Limit trackers for new issue to certain roles (#7839).

git-svn-id: http://svn.redmine.org/redmine/trunk@15464 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-06-05 10:06:17 +00:00
parent 939a7137ef
commit 79df68e17f
11 changed files with 272 additions and 8 deletions

View File

@@ -467,7 +467,13 @@ class IssuesController < ApplicationController
if @issue.project
@issue.tracker ||= @issue.allowed_target_trackers.first
if @issue.tracker.nil?
render_error l(:error_no_tracker_in_project)
if @issue.project.trackers.any?
# None of the project trackers is allowed to the user
render_error :message => l(:error_no_tracker_allowed_for_new_issue_in_project), :status => 403
else
# Project has no trackers
render_error l(:error_no_tracker_in_project)
end
return false
end
if @issue.status.nil?