search: fix searches for private favgroups raising privilege errors.
Change favgroup:<name> searches to return no results instead of raising a UserPrivilege error when an unpermitted user searches for a private favgroup. Partial fix for #4389.
This commit is contained in:
@@ -52,7 +52,7 @@ module PostSets
|
||||
name = Tag.has_metatag?(tag_array, :favgroup)
|
||||
return nil unless is_single_tag? && name.present?
|
||||
|
||||
@favgroup ||= FavoriteGroup.find_by_name_or_id(name, CurrentUser.user)
|
||||
@favgroup ||= FavoriteGroup.visible(CurrentUser.user).find_by_name_or_id(name, CurrentUser.user)
|
||||
end
|
||||
|
||||
def has_explicit?
|
||||
|
||||
Reference in New Issue
Block a user