Implements RBAC-based write gating for Intune restore flows, UI affordances, and audit logging; adds tests and specs.
24 lines
630 B
PHP
24 lines
630 B
PHP
<?php
|
|
|
|
namespace App\Contracts\Hardening;
|
|
|
|
use App\Exceptions\Hardening\ProviderAccessHardeningRequired;
|
|
use App\Models\Tenant;
|
|
|
|
interface WriteGateInterface
|
|
{
|
|
/**
|
|
* Evaluate whether a write operation is allowed for the given tenant.
|
|
*
|
|
* @throws ProviderAccessHardeningRequired when the operation is blocked
|
|
*/
|
|
public function evaluate(Tenant $tenant, string $operationType): void;
|
|
|
|
/**
|
|
* Check whether the gate would block a write operation for the given tenant.
|
|
*
|
|
* Non-throwing variant for UI disabled-state checks.
|
|
*/
|
|
public function wouldBlock(Tenant $tenant): bool;
|
|
}
|