[PostReplacements] Check approval permission instead of level

Closes #490
This commit is contained in:
Earlopain 2023-03-23 19:20:44 +01:00
parent 9adebb6da7
commit 2dc9cac520
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897

View File

@ -1,7 +1,7 @@
class PostReplacementsController < ApplicationController
respond_to :html, :json
before_action :member_only, only: [:create, :new]
before_action :janitor_only, only: [:approve, :reject, :promote, :toggle_penalize]
before_action :approver_only, only: [:approve, :reject, :promote, :toggle_penalize]
before_action :moderator_only, only: [:destroy]
before_action :ensure_uploads_enabled, only: [:new, :create]