Make cache distinguish pages views by admins or moderators from those
authorTom Hughes <tom@compton.nu>
Wed, 13 Jan 2010 21:30:09 +0000 (21:30 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 13 Jan 2010 21:30:09 +0000 (21:30 +0000)
viewed by normal users.

app/controllers/application_controller.rb

index dc17a21628b91885d46729fd27fd85d6bdb854e7..6750b5d8e2b7487874fbc180c35b941e0986fabb 100644 (file)
@@ -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