mirror of
https://github.com/redmine/redmine.git
synced 2025-11-05 04:45:57 +01:00
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:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user