@@ -2,7 +2,17 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
abstract class Controller
|
||||
{
|
||||
//
|
||||
/** Staff endpoints use the web identity; candidate accounts have their own realm. */
|
||||
protected function staffIdentity(Request $request): User
|
||||
{
|
||||
$actor = $request->user('web');
|
||||
abort_unless($actor instanceof User, 403);
|
||||
|
||||
return $actor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user