Refactor post_approvers_only to approver_only.

Don't duplicate code with post_approvers_only; use the approver_only?
method dynamically defined in `User::Roles.each do ... end`.
This commit is contained in:
evazion
2016-10-14 05:04:40 +00:00
parent d84184b5f1
commit bd6ebceda3
6 changed files with 8 additions and 13 deletions

View File

@@ -430,6 +430,10 @@ class User < ActiveRecord::Base
is_gold? || is_super_voter?
end
def is_approver?
can_approve_posts?
end
def create_mod_action
if level_changed?
ModAction.create(:description => %{"#{name}":/users/#{id} level changed #{level_string_was} -> #{level_string}})