Implements Spec 076 enterprise remediation UX for tenant required permissions. Highlights - Above-the-fold overview (impact + counts) with missing-first experience - Feature-based grouping, filters/search, copy-to-clipboard for missing app/delegated permissions - Tenant-scoped deny-as-not-found semantics; DB-only viewing - Centralized badge semantics (no ad-hoc status mapping) Testing - Feature tests for default filters, grouping, copy output, and non-member 404 behavior. Integration - Adds deep links from verification checks to the Required permissions page. Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box> Reviewed-on: #92
27 lines
803 B
PHP
27 lines
803 B
PHP
<?php
|
|
|
|
use App\Models\Tenant;
|
|
use App\Support\Links\RequiredPermissionsLinks;
|
|
|
|
it('builds a tenant-scoped required permissions link without filters', function (): void {
|
|
$tenant = Tenant::factory()->make([
|
|
'external_id' => 'tenant-123',
|
|
]);
|
|
|
|
expect(RequiredPermissionsLinks::requiredPermissions($tenant))
|
|
->toBe('/admin/t/tenant-123/required-permissions');
|
|
});
|
|
|
|
it('builds a tenant-scoped required permissions link with filters', function (): void {
|
|
$tenant = Tenant::factory()->make([
|
|
'external_id' => 'tenant 123',
|
|
]);
|
|
|
|
$url = RequiredPermissionsLinks::requiredPermissions($tenant, [
|
|
'status' => 'all',
|
|
'type' => 'application',
|
|
]);
|
|
|
|
expect($url)->toBe('/admin/t/tenant+123/required-permissions?status=all&type=application');
|
|
});
|