Code cleanup.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11313 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-02-03 08:23:20 +00:00
parent c9c72cb198
commit b3a2d07257
1 changed files with 1 additions and 1 deletions

View File

@ -444,7 +444,7 @@ class User < Principal
# Return true if the user is a member of project # Return true if the user is a member of project
def member_of?(project) def member_of?(project)
!roles_for_project(project).detect {|role| role.member?}.nil? roles_for_project(project).any? {|role| role.member?}
end end
# Returns a hash of user's projects grouped by roles # Returns a hash of user's projects grouped by roles