]> source.dussan.org Git - redmine.git/commitdiff
Fixed: private projects name are displayed on account/show even if the current user...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 4 Jan 2008 18:02:34 +0000 (18:02 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 4 Jan 2008 18:02:34 +0000 (18:02 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1036 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/account_controller.rb

index a1cbf5ffd9cd79b2a9e6f0565864fb686fab6f27..40debb1f66f91b988fc1ecc947137423e7768aa0 100644 (file)
@@ -30,7 +30,7 @@ class AccountController < ApplicationController
     
     # show only public projects and private projects that the logged in user is also a member of
     @memberships = @user.memberships.select do |membership|
-      membership.project.is_public? || (User.current.role_for_project(membership.project))
+      membership.project.is_public? || (User.current.member_of?(membership.project))
     end
   rescue ActiveRecord::RecordNotFound
     render_404