Allow site admins into ticketing settings
This commit is contained in:
@@ -39,13 +39,14 @@ class TicketingSettingsController extends Controller
|
||||
*/
|
||||
private function requireAgentAccess(): void
|
||||
{
|
||||
// Site admins always have access
|
||||
if ($this->isSiteAdmin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$hasAccess = TicketingAgentAccess::where('user_id', Auth::id())->exists();
|
||||
|
||||
if (!$hasAccess) {
|
||||
// Allow site admins through during bootstrap (no groups yet)
|
||||
if ($this->isBootstrapState() && $this->isSiteAdmin()) {
|
||||
return;
|
||||
}
|
||||
abort(403, 'You need agent access to manage ticketing settings.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user