Add status destroy authorization to policy (#3453)
* Add status destroy authorization to policy * Create explicit unreblog status authorization
This commit is contained in:
parent
3576fa0d59
commit
33f669a5f8
6 changed files with 78 additions and 5 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
module Admin
|
||||
class ReportedStatusesController < BaseController
|
||||
include Authorization
|
||||
|
||||
before_action :set_report
|
||||
before_action :set_status
|
||||
|
||||
|
@ -11,6 +13,7 @@ module Admin
|
|||
end
|
||||
|
||||
def destroy
|
||||
authorize @status, :destroy?
|
||||
RemovalWorker.perform_async(@status.id)
|
||||
redirect_to admin_report_path(@report)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue