Implements provider access hardening for Intune write operations: - RBAC-based write gate with configurable staleness thresholds - Gate enforced at restore start and in jobs (execute + assignments) - UI affordances: disabled rerun action, tenant RBAC status card, refresh RBAC action - Audit logging for blocked writes - Ops UX label: `rbac.health_check` now displays as “RBAC health check” - Adds/updates Pest tests and SpecKit artifacts for feature 108 Notes: - Filament v5 / Livewire v4 compliant. - Destructive actions require confirmation. - Assets: no new global assets. Tested: - `vendor/bin/sail artisan test --compact` (suite previously green) + focused OpsUx tests for OperationCatalog labels. - `vendor/bin/sail bin pint --dirty`. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #132
28 lines
1.1 KiB
PHP
28 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Support\Badges\Domains;
|
|
|
|
use App\Support\Badges\BadgeCatalog;
|
|
use App\Support\Badges\BadgeMapper;
|
|
use App\Support\Badges\BadgeSpec;
|
|
|
|
final class TenantRbacStatusBadge implements BadgeMapper
|
|
{
|
|
public function spec(mixed $value): BadgeSpec
|
|
{
|
|
$state = BadgeCatalog::normalizeState($value);
|
|
|
|
return match ($state) {
|
|
'ok' => new BadgeSpec('OK', 'success', 'heroicon-m-check-circle'),
|
|
'configured' => new BadgeSpec('Configured', 'success', 'heroicon-m-check-circle'),
|
|
'manual_assignment_required' => new BadgeSpec('Manual assignment required', 'warning', 'heroicon-m-exclamation-triangle'),
|
|
'not_configured' => new BadgeSpec('Not configured', 'gray', 'heroicon-m-minus-circle'),
|
|
'degraded' => new BadgeSpec('Degraded', 'warning', 'heroicon-m-exclamation-triangle'),
|
|
'stale' => new BadgeSpec('Stale', 'warning', 'heroicon-m-clock'),
|
|
'error' => new BadgeSpec('Error', 'danger', 'heroicon-m-x-circle'),
|
|
'failed' => new BadgeSpec('Failed', 'danger', 'heroicon-m-x-circle'),
|
|
default => BadgeSpec::unknown(),
|
|
};
|
|
}
|
|
}
|