FIX: check can_create_tag on create and not on select

This commit is contained in:
Joffrey JAFFEUX 2018-02-14 12:20:07 +01:00 committed by GitHub
parent e3774c7bed
commit 23ef5f10e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,7 @@ export default ComboBox.extend({
},
validateCreate(term) {
if (this.get("limitReached")) {
if (this.get("limitReached") || !this.site.get("can_create_tag")) {
return false;
}
@ -82,8 +82,7 @@ export default ComboBox.extend({
},
validateSelect() {
return this.get("computedTags").length < this.get("siteSettings.max_tags_per_topic") &&
this.site.get("can_create_tag");
return this.get("computedTags").length < this.get("siteSettings.max_tags_per_topic");
},
filterComputedContent(computedContent) {