From b8e9056ee3fb98439284ed916b782c6d8c9d8f12 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 4 Dec 2021 15:30:08 -0700 Subject: [PATCH 1/2] Update UserInviteController, fixes #3017 --- app/Http/Controllers/UserInviteController.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/UserInviteController.php b/app/Http/Controllers/UserInviteController.php index c9f83301..9a827282 100644 --- a/app/Http/Controllers/UserInviteController.php +++ b/app/Http/Controllers/UserInviteController.php @@ -9,19 +9,16 @@ use Illuminate\Support\Str; class UserInviteController extends Controller { - public function __construct() - { - abort_if(!config('pixelfed.user_invites.enabled'), 404); - } - public function create(Request $request) { + abort_if(!config('pixelfed.user_invites.enabled'), 404); abort_unless(Auth::check(), 403); return view('settings.invites.create'); } public function show(Request $request) { + abort_if(!config('pixelfed.user_invites.enabled'), 404); abort_unless(Auth::check(), 403); $invites = UserInvite::whereUserId(Auth::id())->paginate(10); $limit = config('pixelfed.user_invites.limit.total'); @@ -31,6 +28,7 @@ class UserInviteController extends Controller public function store(Request $request) { + abort_if(!config('pixelfed.user_invites.enabled'), 404); abort_unless(Auth::check(), 403); $this->validate($request, [ 'email' => 'required|email|unique:users|unique:user_invites', From c4d3851afe6dfed7dab5f67911487799b599f3f8 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 4 Dec 2021 15:31:09 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b6c1a5e..26b96459 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - Updated PublicApiController, fix private account statuses api. Closes #2995. ([aa2dd26c](https://github.com/pixelfed/pixelfed/commit/aa2dd26c)) - Updated Status model, use AccountService to generate urls instead of loading profile relation. ([2ae527c0](https://github.com/pixelfed/pixelfed/commit/2ae527c0)) - Updated Autospam service, add mark all as read and mark all as not spam options and filter active, spam and not spam reports. ([ae8c7517](https://github.com/pixelfed/pixelfed/commit/ae8c7517)) +- Updated UserInviteController, fixes #3017. ([b8e9056e](https://github.com/pixelfed/pixelfed/commit/b8e9056e)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)