From a921eb4e39390eeec6c49c706aad3630b1d50282 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Thu, 20 Aug 2020 05:52:54 -0500 Subject: [Filtering, Bug] Remove duplicate or unnecessary permission checks, add missing filter_options argument --- app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb | 1 - app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb | 1 - app/controllers/api/v1/statuses_controller.rb | 1 - 3 files changed, 3 deletions(-) (limited to 'app/controllers/api/v1') diff --git a/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb b/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb index 45dc212bb..8229786d6 100644 --- a/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb +++ b/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb @@ -66,7 +66,6 @@ class Api::V1::Statuses::FavouritedByAccountsController < Api::BaseController def set_status @status = Status.find(params[:status_id]) authorize @status, :show? - authorize @status.reblog, :show? if @status.reblog? rescue Mastodon::NotPermittedError not_found end diff --git a/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb b/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb index cc8c75ea0..6c9e49d90 100644 --- a/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb +++ b/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb @@ -63,7 +63,6 @@ class Api::V1::Statuses::RebloggedByAccountsController < Api::BaseController def set_status @status = Status.find(params[:status_id]) authorize @status, :show? - authorize @status.reblog, :show? if @status.reblog? rescue Mastodon::NotPermittedError not_found end diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index cf21ee90c..d4cdb6eae 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -108,7 +108,6 @@ class Api::V1::StatusesController < Api::BaseController def set_status @status = Status.find(params[:id]) authorize @status, :show? - authorize @status.reblog, :show? if @status.reblog? rescue Mastodon::NotPermittedError not_found end -- cgit