summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-06 06:32:10 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-06 06:32:10 +0000
commitc87783d50d559915847ffcfc9c95bde274eaad0d (patch)
treec54226881d2f4dbf59e4be6f72db03fccfbac012
parentb25f902d55d9a98ae7b16f05a44fc3b3588e2f2a (diff)
downloadredmine-c87783d50d559915847ffcfc9c95bde274eaad0d.tar.gz
redmine-c87783d50d559915847ffcfc9c95bde274eaad0d.zip
Always authorize admin users.
git-svn-id: http://svn.redmine.org/redmine/trunk@15475 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/issue.rb8
1 files changed, 6 insertions, 2 deletions
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