mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:32:45 +08:00
Disable onebox of user pages
This commit is contained in:
parent
f86aead49e
commit
09b640b782
|
@ -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>"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user