projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee5735d
)
Make cache distinguish pages views by admins or moderators from those
author
Tom Hughes
<tom@compton.nu>
Wed, 13 Jan 2010 21:30:09 +0000
(21:30 +0000)
committer
Tom Hughes
<tom@compton.nu>
Wed, 13 Jan 2010 21:30:09 +0000
(21:30 +0000)
viewed by normal users.
app/controllers/application_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/application_controller.rb
b/app/controllers/application_controller.rb
index dc17a21628b91885d46729fd27fd85d6bdb854e7..6750b5d8e2b7487874fbc180c35b941e0986fabb 100644
(file)
--- a/
app/controllers/application_controller.rb
+++ b/
app/controllers/application_controller.rb
@@
-228,6
+228,8
@@
class ApplicationController < ActionController::Base
case
when user.nil? then user = :none
when user.display_name == controller.params[:display_name] then user = :self
+ when user.administrator? then user = :administrator
+ when user.moderator? then user = :moderator
else user = :other
end