5
3
mirror of https://github.com/tildeverse/lobsters synced 2024-06-18 22:57:09 +00:00

fix Tag.accessible_to to allow moderators to use privileged tags

This commit is contained in:
joshua stein 2014-01-14 11:39:27 -06:00
parent 566c1090e8
commit be2c706c06

View File

@ -7,7 +7,7 @@ class Tag < ActiveRecord::Base
attr_accessor :filtered_count
scope :accessible_to, ->(user) do
user && user.is_admin?? all : where(:privileged => false)
user && user.is_moderator?? all : where(:privileged => false)
end
def to_param