mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Disable onebox of user pages
This commit is contained in:
parent
f86aead49e
commit
09b640b782
1 changed files with 7 additions and 7 deletions
|
@ -17,16 +17,16 @@ module Oneboxer
|
|||
|
||||
# Figure out what kind of onebox to show based on the URL
|
||||
case route[:controller]
|
||||
when 'users'
|
||||
user = User.where(username_lower: route[:username].downcase).first
|
||||
return nil unless user
|
||||
# when 'users'
|
||||
# user = User.where(username_lower: route[:username].downcase).first
|
||||
# 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[:bio] = user.bio_cooked if user.bio_cooked.present?
|
||||
# args.merge! avatar: PrettyText.avatar_img(user.avatar_template, 'tiny'), username: user.username
|
||||
# args[:bio] = user.bio_cooked if user.bio_cooked.present?
|
||||
|
||||
@template = 'user'
|
||||
# @template = 'user'
|
||||
when 'topics'
|
||||
|
||||
linked = "<a href='#{@url}'>#{@url}</a>"
|
||||
|
|
Loading…
Reference in a new issue