From 8019cd6fcd43e15c1523c5bd30f5e60742c0c0d9 Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Tue, 15 Sep 2020 12:11:33 -0400 Subject: [PATCH] lock blog tag (#8398) cc @ebarry --- app/models/node.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/node.rb b/app/models/node.rb index 4c5d015805..39781d8663 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -1018,6 +1018,8 @@ def can_tag(tagname, user, errors = false) errors ? I18n.t('node.only_RSVP_for_yourself') : false elsif tagname == 'locked' && user.role != 'admin' errors ? I18n.t('node.only_admins_can_lock') : false + elsif tagname == 'blog' && user.role != 'admin' && user.role != 'moderator' + errors ? 'Only moderators or admins can use this tag.' : false elsif tagname.split(':')[0] == 'redirect' && Node.where(slug: one_split).size <= 0 errors ? I18n.t('node.page_does_not_exist') : false elsif socials[one_split&.to_sym].present?