fix Tag.accessible_to to allow moderators to use privileged tags
This commit is contained in:
parent
566c1090e8
commit
be2c706c06
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue