mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 14:33:39 +08:00
FEATURE: check nofollow setting when showing website
This commit is contained in:
parent
2282869f30
commit
8366b71176
|
@ -19,6 +19,10 @@ export default ObjectController.extend(CanCheckEmails, {
|
|||
|
||||
linkWebsite: Em.computed.not('isBasic'),
|
||||
|
||||
removeNoFollow: function() {
|
||||
return this.get('trust_level') > 2 && !this.siteSettings.tl3_links_no_follow;
|
||||
}.property('trust_level'),
|
||||
|
||||
canSeePrivateMessages: Ember.computed.or('viewingSelf', 'currentUser.admin'),
|
||||
canSeeNotificationHistory: Em.computed.alias('canSeePrivateMessages'),
|
||||
|
||||
|
|
|
@ -71,7 +71,11 @@
|
|||
{{#if websiteName}}
|
||||
{{fa-icon "globe"}}
|
||||
{{#if linkWebsite}}
|
||||
<a {{bind-attr href="website"}} rel="nofollow" target="_blank">{{websiteName}}</a>
|
||||
{{#if removeNoFollow}}
|
||||
<a {{bind-attr href="website"}} target="_blank">{{websiteName}}</a>
|
||||
{{else}}
|
||||
<a {{bind-attr href="website"}} rel="nofollow" target="_blank">{{websiteName}}</a>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<span {{bind-attr title="website"}}>{{websiteName}}</span>
|
||||
{{/if}}
|
||||
|
|
|
@ -611,7 +611,9 @@ trust:
|
|||
tl3_requires_likes_received:
|
||||
default: 20
|
||||
min: 0
|
||||
tl3_links_no_follow: false
|
||||
tl3_links_no_follow:
|
||||
default: false
|
||||
client: true
|
||||
|
||||
security:
|
||||
use_https: false
|
||||
|
|
Loading…
Reference in New Issue
Block a user