Update ParentalControlsController, prevent children from adding accounts

This commit is contained in:
Daniel Supernault 2024-01-11 06:52:12 -07:00
parent db1b466792
commit c91f1c595a
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1
1 changed files with 1 additions and 0 deletions

View File

@ -19,6 +19,7 @@ class ParentalControlsController extends Controller
{
if($authCheck) {
abort_unless($request->user(), 404);
abort_unless($request->user()->has_roles === 0, 404);
}
abort_unless(config('instance.parental_controls.enabled'), 404);
if(config_cache('pixelfed.open_registration') == false) {