mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 18:03:38 +08:00
FIX: do not show website name on TL0 profile
This commit is contained in:
parent
b93a4e369d
commit
a10c939775
|
@ -115,6 +115,7 @@ class UserSerializer < BasicUserSerializer
|
|||
:bio_excerpt,
|
||||
:location,
|
||||
:website,
|
||||
:website_name,
|
||||
:profile_background,
|
||||
:card_background
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ describe UserSerializer do
|
|||
let(:serializer) { UserSerializer.new(user, scope: Guardian.new, root: false) }
|
||||
let(:json) { serializer.as_json }
|
||||
|
||||
let(:untrusted_attributes) { %i{bio_raw bio_cooked bio_excerpt location website profile_background card_background} }
|
||||
let(:untrusted_attributes) { %i{bio_raw bio_cooked bio_excerpt location website website_name profile_background card_background} }
|
||||
|
||||
it "doesn't serialize untrusted attributes" do
|
||||
untrusted_attributes.each { |attr| expect(json).not_to have_key(attr) }
|
||||
|
|
Loading…
Reference in New Issue
Block a user