summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-06-12 21:55:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-06-12 21:55:39 +0000
commit07d88851bf82f5d3fd5761157d64e7e4a8510b78 (patch)
tree69c1fa980a620896ae6e33c14308486cf6bfd562 /app
parente978b3ace0e8632bec90d3894c0a2dc1de13a4ea (diff)
downloadredmine-07d88851bf82f5d3fd5761157d64e7e4a8510b78.tar.gz
redmine-07d88851bf82f5d3fd5761157d64e7e4a8510b78.zip
Fixed tests broken by r11965.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11966 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index b5d600395..f8813b167 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -136,6 +136,7 @@ class User < Principal
@membership_by_project_id = nil
@notified_projects_ids = nil
@notified_projects_ids_changed = false
+ @builtin_role = nil
base_reload(*args)
end
@@ -444,11 +445,7 @@ class User < Principal
# Returns the user's bult-in role
def builtin_role
- if logged?
- @role_non_member ||= Role.non_member
- else
- @role_anonymous ||= Role.anonymous
- end
+ @builtin_role ||= (logged? ? Role.non_member : Role.anonymous)
end
# Return user's roles for project