Explorar o código

Update SettingsController

Daniel Supernault %!s(int64=6) %!d(string=hai) anos
pai
achega
6f4da63a83
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      app/Http/Controllers/SettingsController.php

+ 6 - 0
app/Http/Controllers/SettingsController.php

@@ -149,11 +149,17 @@ class SettingsController extends Controller
 
     public function removeAccountPermanent(Request $request)
     {
+        if(config('pixelfed.account_deletion') == false) {
+            abort(404);
+        }
         return view('settings.remove.permanent');
     }
 
     public function removeAccountPermanentSubmit(Request $request)
     {
+        if(config('pixelfed.account_deletion') == false) {
+            abort(404);
+        }
         $user = Auth::user();
         if($user->is_admin == true) {
             return abort(400, 'You cannot delete an admin account.');