From c87783d50d559915847ffcfc9c95bde274eaad0d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 6 Jun 2016 06:32:10 +0000 Subject: Always authorize admin users. git-svn-id: http://svn.redmine.org/redmine/trunk@15475 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/models') diff --git a/app/models/issue.rb b/app/models/issue.rb index 28a7f9fe6..0044e73b2 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1417,8 +1417,12 @@ class Issue < ActiveRecord::Base private def user_tracker_permission?(user, permission) - roles = user.roles_for_project(project).select {|r| r.has_permission?(permission)} - roles.any? {|r| r.permissions_all_trackers?(permission) || r.permissions_tracker_ids?(permission, tracker_id)} + if user.admin? + true + else + roles = user.roles_for_project(project).select {|r| r.has_permission?(permission)} + roles.any? {|r| r.permissions_all_trackers?(permission) || r.permissions_tracker_ids?(permission, tracker_id)} + end end def after_project_change -- cgit v1.2.3