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

@@ -174,13 +174,4 @@ protected
Rails.application.config.session_store :cookie_store, :key => '_danbooru_session', :secure => false
end
end
def post_approvers_only
if CurrentUser.can_approve_posts?
true
else
access_denied()
false
end
end
end