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:
Robin Ward
2018-06-13 14:57:32 -04:00
parent debbb5be16
commit fd54c92a52
10 changed files with 96 additions and 21 deletions

View File

@@ -47,6 +47,11 @@ export default Ember.Component.extend({
}
},
@computed
showLink() {
return this.currentUser && this.currentUser.get('link_posting_access') !== 'none';
},
@computed('composer.requiredCategoryMissing', 'composer.replyLength')
disableTextarea(requiredCategoryMissing, replyLength) {
return requiredCategoryMissing && replyLength === 0;

View File

@@ -11,7 +11,7 @@
validation=validation
loading=composer.loading
forcePreview=forcePreview
showLink=currentUser.can_post_link
showLink=showLink
composerEvents=true
onExpandPopupMenuOptions="onExpandPopupMenuOptions"
onPopupMenuAction=onPopupMenuAction