FIX: Users should be able to delete their own queued posts (#10265)

This commit is contained in:
Roman Rizzi 2020-07-20 17:21:20 -03:00 committed by GitHub
parent 7ab5658462
commit 98eb7a3f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ class ReviewablesController < ApplicationController
PER_PAGE = 10 PER_PAGE = 10
before_action :version_required, only: [:update, :perform] before_action :version_required, only: [:update, :perform]
before_action :ensure_can_see before_action :ensure_can_see, except: [:destroy]
def index def index
offset = params[:offset].to_i offset = params[:offset].to_i

View File

@ -590,7 +590,7 @@ describe ReviewablesController do
end end
context "#destroy" do context "#destroy" do
fab!(:user) { Fabricate(:admin) } fab!(:user) { Fabricate(:user) }
before do before do
sign_in(user) sign_in(user)