Make cache distinguish pages views by admins or moderators from those
viewed by normal users.
This commit is contained in:
parent
ee5735d550
commit
fa554045e5
1 changed files with 2 additions and 0 deletions
|
@ -228,6 +228,8 @@ class ApplicationController < ActionController::Base
|
||||||
case
|
case
|
||||||
when user.nil? then user = :none
|
when user.nil? then user = :none
|
||||||
when user.display_name == controller.params[:display_name] then user = :self
|
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
|
else user = :other
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue