mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: New site setting, whitelisted_link_domains
If provided, users who normally couldn't post links (say, due to a low trust level), can post links to those specific hosts.
This commit is contained in:
@@ -452,6 +452,13 @@ describe Post do
|
||||
post_two_links.user.trust_level = TrustLevel[1]
|
||||
expect(post_one_link).not_to be_valid
|
||||
end
|
||||
|
||||
it "will skip the check for whitelisted domains" do
|
||||
SiteSetting.whitelisted_link_domains = 'www.bbc.co.uk'
|
||||
SiteSetting.min_trust_to_post_links = 2
|
||||
post_two_links.user.trust_level = TrustLevel[1]
|
||||
expect(post_one_link).to be_valid
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user