diff --git a/skolehjem/app/Http/Controllers/ExternalLinkController.php b/skolehjem/app/Http/Controllers/ExternalLinkController.php index 3b3b9a7..0df95e4 100644 --- a/skolehjem/app/Http/Controllers/ExternalLinkController.php +++ b/skolehjem/app/Http/Controllers/ExternalLinkController.php @@ -11,6 +11,8 @@ class ExternalLinkController extends Controller { function __construct() { + $this->middleware([ "auth" ]); + $this->middleware("permission:link.external.list")->only("index"); $this->middleware("permission:link.external.create")->only(["create", "store"]); $this->middleware("permission:link.external.show")->only("show"); diff --git a/skolehjem/database/seeds/PermissionSeeder.php b/skolehjem/database/seeds/PermissionSeeder.php index f85c0e9..4c6c995 100644 --- a/skolehjem/database/seeds/PermissionSeeder.php +++ b/skolehjem/database/seeds/PermissionSeeder.php @@ -98,8 +98,15 @@ class PermissionSeeder extends Seeder "washing.machine.reservation.edit" => "Allows editing of washing machine reservations", "washing.machine.reservation.delete" => "Allows deletion of washing machine reservations", + "roles.create" => "Create a new role", + "roles.list" => "Shows all roles", + "roles.show" => "Shows a specific role", + "roles.edit" => "Allows editing of roles", + "roles.delete" => "Allows deletion of roles", + //Allows access to the admin panel "admin.panel.show" => "Allows access to administration panel", + ]; foreach ($permissions as $key => $value) {