summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-16 07:50:20 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-16 07:50:20 +0000
commit97751b3d8482c295017efaf125ca3db5ddedd36a (patch)
tree0c82ebef41a806888cc55aca189a072dd41f407a /app
parent84fbebbd92784cfdb1f81d39345122b6a9fc198f (diff)
downloadredmine-97751b3d8482c295017efaf125ca3db5ddedd36a.tar.gz
redmine-97751b3d8482c295017efaf125ca3db5ddedd36a.zip
Performance in User#roles_for_project (#21582).
Patch by by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@15060 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 4a6109f7d..2a1818c6e 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -544,7 +544,7 @@ class User < Principal
# No role on archived projects
return [] if project.nil? || project.archived?
if membership = membership(project)
- membership.roles.dup
+ membership.roles.to_a
elsif project.is_public?
project.override_roles(builtin_role)
else