diff --git a/app/Http/Controllers/GroupsController.php b/app/Http/Controllers/GroupsController.php index a5761fa02f6..6196160354e 100644 --- a/app/Http/Controllers/GroupsController.php +++ b/app/Http/Controllers/GroupsController.php @@ -12,7 +12,8 @@ class GroupsController extends Controller public function show($id) { $group = app('groups')->byIdOrFail($id); - abort_unless($group->hasListing(), 404); + abort_if($group->identifier === 'default', 404); + priv_check('GroupShow', $group)->ensureCan(); $currentMode = default_mode(); $users = $group->users() diff --git a/tests/Browser/SanityTest.php b/tests/Browser/SanityTest.php index 90385ab8922..54920bd8c29 100644 --- a/tests/Browser/SanityTest.php +++ b/tests/Browser/SanityTest.php @@ -259,7 +259,7 @@ private static function createScaffolding() ]); // factory for /g/* - self::$scaffolding['group'] = Group::first(); + self::$scaffolding['group'] = Group::where('group_type', 1)->first(); // factory for comments self::$scaffolding['comment'] = Comment::factory()->create([