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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user