Adds cross-project time reports support (#994).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1778 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-08-31 16:34:54 +00:00
parent dbad26c87d
commit 696d21f8c8
8 changed files with 100 additions and 20 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ class User < ActiveRecord::Base
elsif options[:global]
# authorize if user has at least one role that has this permission
roles = memberships.collect {|m| m.role}.uniq
roles.detect {|r| r.allowed_to?(action)}
roles.detect {|r| r.allowed_to?(action)} || (self.logged? ? Role.non_member.allowed_to?(action) : Role.anonymous.allowed_to?(action))
else
false
end