Benutzerrollen (Administrator, Vermietung, Inhalte) und Benutzerverwaltung
- Rollenbasierte Policies, Navigationsgruppen - Media Library (Spatie) für die kommende Bildverwaltung installiert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
08b6582fa1
commit
27ea12901e
25 files changed
+1341
-81
No files matched your search
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Filament\Support\Contracts\HasDescription;
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
enum UserRole: string implements HasDescription, HasLabel
|
||||
{
|
||||
case Admin = 'admin';
|
||||
case Rentals = 'rentals';
|
||||
case Content = 'content';
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Admin => 'Administrator',
|
||||
self::Rentals => 'Vermietung',
|
||||
self::Content => 'Inhalte',
|
||||
};
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Admin => 'Alles, inklusive Benutzerverwaltung',
|
||||
self::Rentals => 'Buchungen, Gäste, Preise, Angebote und Bewertungen',
|
||||
self::Content => 'Bilder, Texte, FAQ, Hinweise und Bewertungen',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user