mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
19 lines
330 B
PHP
19 lines
330 B
PHP
<?php
|
|
/** @phpstan-var \Gazelle\User $Viewer */
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Gazelle;
|
|
|
|
$spm = new Manager\StaffPM()->findById((int)($_GET['id'] ?? 0));
|
|
if (is_null($spm)) {
|
|
Error404::error();
|
|
}
|
|
if (!$spm->visible($Viewer)) {
|
|
Error403::error();
|
|
}
|
|
|
|
$spm->unresolve($Viewer);
|
|
|
|
header("Location: {$spm->location()}");
|