## Summary <!-- Kurz: Was ändert sich und warum? --> ## Spec-Driven Development (SDD) - [ ] Es gibt eine Spec unter `specs/<NNN>-<feature>/` - [ ] Enthaltene Dateien: `plan.md`, `tasks.md`, `spec.md` - [ ] Spec beschreibt Verhalten/Acceptance Criteria (nicht nur Implementation) - [ ] Wenn sich Anforderungen während der Umsetzung geändert haben: Spec/Plan/Tasks wurden aktualisiert ## Implementation - [ ] Implementierung entspricht der Spec - [ ] Edge cases / Fehlerfälle berücksichtigt - [ ] Keine unbeabsichtigten Änderungen außerhalb des Scopes ## Tests - [ ] Tests ergänzt/aktualisiert (Pest/PHPUnit) - [ ] Relevante Tests lokal ausgeführt (`./vendor/bin/sail artisan test` oder `php artisan test`) ## Migration / Config / Ops (falls relevant) - [ ] Migration(en) enthalten und getestet - [ ] Rollback bedacht (rückwärts kompatibel, sichere Migration) - [ ] Neue Env Vars dokumentiert (`.env.example` / Doku) - [ ] Queue/cron/storage Auswirkungen geprüft ## UI (Filament/Livewire) (falls relevant) - [ ] UI-Flows geprüft - [ ] Screenshots/Notizen hinzugefügt ## Notes <!-- Links, Screenshots, Follow-ups, offene Punkte --> Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local> Reviewed-on: #4
80 lines
3.5 KiB
PHP
80 lines
3.5 KiB
PHP
@php
|
|
$tenant = $getRecord();
|
|
$warnings = $tenant->rbac_last_warnings ?? [];
|
|
$canaries = $tenant->rbac_canary_results ?? [];
|
|
@endphp
|
|
|
|
<div class="space-y-3 rounded-md border border-gray-200 bg-white p-4 shadow-sm">
|
|
<div class="text-sm font-semibold text-gray-800">Last RBAC Setup</div>
|
|
<dl class="grid grid-cols-1 gap-3 sm:grid-cols-2">
|
|
<div>
|
|
<dt class="text-xs uppercase tracking-wide text-gray-500">Role</dt>
|
|
<dd class="text-sm text-gray-800">
|
|
{{ $tenant->rbac_role_display_name ?? $tenant->rbac_role_definition_id ?? 'n/a' }}
|
|
@if ($tenant->rbac_role_definition_id)
|
|
<span class="text-xs text-gray-500">(ID: {{ $tenant->rbac_role_definition_id }})</span>
|
|
@endif
|
|
</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs uppercase tracking-wide text-gray-500">Scope</dt>
|
|
<dd class="text-sm text-gray-800">
|
|
{{ $tenant->rbac_scope_mode ?? 'n/a' }}
|
|
@if ($tenant->rbac_scope_id)
|
|
({{ $tenant->rbac_scope_id }})
|
|
@endif
|
|
</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs uppercase tracking-wide text-gray-500">Group ID</dt>
|
|
<dd class="text-sm text-gray-800">{{ $tenant->rbac_group_id ?? 'n/a' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs uppercase tracking-wide text-gray-500">Role Assignment</dt>
|
|
<dd class="text-sm text-gray-800">{{ $tenant->rbac_role_assignment_id ?? 'n/a' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs uppercase tracking-wide text-gray-500">Executed at</dt>
|
|
<dd class="text-sm text-gray-800">{{ optional($tenant->rbac_last_setup_at)->toDateTimeString() ?? 'n/a' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs uppercase tracking-wide text-gray-500">Executed by (user id)</dt>
|
|
<dd class="text-sm text-gray-800">{{ $tenant->rbac_last_setup_by ?? 'n/a' }}</dd>
|
|
</div>
|
|
</dl>
|
|
|
|
<div>
|
|
<div class="text-xs uppercase tracking-wide text-gray-500 mb-1">Canaries</div>
|
|
@if (empty($canaries))
|
|
<div class="text-sm text-gray-700">No canary results recorded.</div>
|
|
@else
|
|
<ul class="space-y-1 text-sm">
|
|
@foreach ($canaries as $key => $status)
|
|
<li class="flex items-center gap-2">
|
|
<span class="font-semibold text-gray-800">{{ $key }}:</span>
|
|
<span class="inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium
|
|
{{ $status === 'ok' ? 'bg-green-100 text-green-700' : '' }}
|
|
{{ $status === 'error' ? 'bg-red-100 text-red-700' : '' }}
|
|
{{ $status === 'pending' ? 'bg-yellow-100 text-yellow-700' : '' }}
|
|
{{ !in_array($status, ['ok', 'error', 'pending']) ? 'bg-gray-100 text-gray-700' : '' }}
|
|
">
|
|
{{ $status }}
|
|
</span>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
@endif
|
|
</div>
|
|
|
|
@if (! empty($warnings))
|
|
<div class="rounded-md border border-amber-300 bg-amber-50 p-3 text-sm text-amber-800">
|
|
<div class="font-semibold">Warnings</div>
|
|
<ul class="mt-1 list-disc space-y-1 pl-5">
|
|
@foreach ($warnings as $warning)
|
|
<li>{{ $warning }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
</div>
|