Disable onebox of user pages

This commit is contained in:
Neil Lalonde 2013-09-13 17:01:28 -04:00
parent f86aead49e
commit 09b640b782

View File

@ -17,16 +17,16 @@ module Oneboxer
# Figure out what kind of onebox to show based on the URL # Figure out what kind of onebox to show based on the URL
case route[:controller] case route[:controller]
when 'users' # when 'users'
user = User.where(username_lower: route[:username].downcase).first # user = User.where(username_lower: route[:username].downcase).first
return nil unless user # return nil unless user
return @url unless Guardian.new.can_see?(user) # return @url unless Guardian.new.can_see?(user)
args.merge! avatar: PrettyText.avatar_img(user.avatar_template, 'tiny'), username: user.username # args.merge! avatar: PrettyText.avatar_img(user.avatar_template, 'tiny'), username: user.username
args[:bio] = user.bio_cooked if user.bio_cooked.present? # args[:bio] = user.bio_cooked if user.bio_cooked.present?
@template = 'user' # @template = 'user'
when 'topics' when 'topics'
linked = "<a href='#{@url}'>#{@url}</a>" linked = "<a href='#{@url}'>#{@url}</a>"