redirekt login
This commit is contained in:
1 parent
005924ef8a
commit
b03f1eda4d
5 files changed
+14
-44
No files matched your search
@@ -68,11 +68,19 @@ class UserResource extends Resource
|
||||
|
||||
public static function getEloquentQuery(): Builder
|
||||
{
|
||||
return parent::getEloquentQuery()->where('konto_id', auth()->user()->konto_id);
|
||||
if (auth()->user()->super_admin) {
|
||||
return parent::getEloquentQuery()->where('konto_id', auth()->user()->konto_id);
|
||||
} else {
|
||||
return parent::getEloquentQuery()->where('super_admin', false)->where('konto_id', auth()->user()->konto_id);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return parent::getEloquentQuery()->where('konto_id', auth()->user()->konto_id)->count();
|
||||
if (auth()->user()->super_admin) {
|
||||
return parent::getEloquentQuery()->where('konto_id', auth()->user()->konto_id)->count();
|
||||
} else {
|
||||
return parent::getEloquentQuery()->where('super_admin', false)->where('konto_id', auth()->user()->konto_id)->count();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user