@php
$record = $getRecord();
$user = $record['user'];
$host = $record['host'];
$grants = $this->getUserGrants($user, $host);
@endphp
@if(count($grants) > 0)
@foreach($grants as $grant)
@php
$privs = $grant['privileges'] ?? [];
if (is_string($privs)) {
$privs = array_map('trim', explode(',', $privs));
}
$isAll = count($privs) === 1 && in_array(strtoupper(trim($privs[0])), ['ALL', 'ALL PRIVILEGES']);
@endphp
{{ $grant['database'] ?? __('Unknown') }}
@if($isAll)
({{ __('Full Access') }})
@else
({{ implode(', ', $privs) }})
@endif
@endforeach
@else
{{ __('No database access') }}
@endif