Skip to content

Commit

Permalink
Updated node.rb (#9819)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashwat545 authored Jun 20, 2021
1 parent 20e5fda commit cf6f681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ def can_tag(tagname, user, errors = false)
errors ? I18n.t('node.only_RSVP_for_yourself') : false
elsif tagname == 'locked' && !user.can_moderate?
errors ? I18n.t('node.only_admins_can_lock') : false
elsif tagname == 'blog' && user.role != 'admin' && user.role != 'moderator'
elsif tagname == 'blog' && user.basic_user?
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
Expand Down

0 comments on commit cf6f681

Please sign in to comment.