## Summary
Implements Spec 145 for tenant action taxonomy and lifecycle-safe visibility.
This PR:
- adds a central tenant action policy surface and supporting value objects
- aligns tenant list, detail, edit, onboarding, and widget surfaces around lifecycle-safe actions
- standardizes operator-facing lifecycle wording around View, Resume onboarding, Archive, Restore, and Complete onboarding
- tightens onboarding and tenant lifecycle authorization semantics, including honest 404 vs 403 behavior
- updates related regression coverage and spec artifacts for Spec 145
- fixes follow-on full-suite regressions uncovered during validation, including onboarding browser flows, provider consent fixtures, workspace redirect DI expectations, and critical table/action/UI expectation drift
## Validation
Executed and passed:
- vendor/bin/sail bin pint --dirty --format agent
- vendor/bin/sail artisan test --compact
Result:
- 2581 passed
- 8 skipped
- 13534 assertions
## Notes
- Base branch: dev
- Feature branch commit: a33a41b
- Filament v5 / Livewire v4 compliance preserved
- No panel provider registration changes; Laravel 12 provider registration remains in bootstrap/providers.php
- No new globally searchable resource behavior added in this slice
- Destructive lifecycle actions remain confirmation-gated and authorization-protected
Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #174
44 lines
1.3 KiB
PHP
44 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support\Rbac;
|
|
|
|
/**
|
|
* Standardized tooltip and confirmation messages for RBAC UI enforcement.
|
|
*
|
|
* These constants provide consistent, non-leaky messaging for:
|
|
* - Permission denials (members lacking capability)
|
|
* - Destructive action confirmations
|
|
*
|
|
* @see \App\Support\Rbac\UiEnforcement
|
|
*/
|
|
final class UiTooltips
|
|
{
|
|
/**
|
|
* Tooltip shown when a member lacks the required capability.
|
|
* Intentionally vague to avoid leaking permission structure.
|
|
*/
|
|
public const INSUFFICIENT_PERMISSION = 'Insufficient permission — ask a tenant Owner.';
|
|
|
|
/**
|
|
* Modal heading for destructive action confirmation.
|
|
*/
|
|
public const DESTRUCTIVE_CONFIRM_TITLE = 'Are you sure?';
|
|
|
|
/**
|
|
* Modal description for destructive action confirmation.
|
|
*/
|
|
public const DESTRUCTIVE_CONFIRM_DESCRIPTION = 'This action cannot be undone.';
|
|
|
|
/**
|
|
* Tooltip for actions that are unavailable because the tenant is archived.
|
|
*/
|
|
public const TENANT_ARCHIVED = 'This tenant is currently archived.';
|
|
|
|
/**
|
|
* Tooltip for actions that are unavailable because a tenant must always have an owner.
|
|
*/
|
|
public const TENANT_OWNER_REQUIRED = 'This tenant must have at least one Owner.';
|
|
}
|