Area: mobieusHelp (audit p7) · Surface: platform/src/Services/Helpdesk/HelpdeskContext.php · Dimension: dead-code · Severity: minor
HelpdeskContext exposes hasAnyRole(...$slugs) as its role-membership check, but helpdesk authorization actually flows through HelpdeskPermissions::can() and the $ctx->roles array is consumed directly elsewhere. No code calls $ctx->hasAnyRole(). It is a dead public accessor.
Evidence
Definition at platform/src/Services/Helpdesk/HelpdeskContext.php:73 `public function hasAnyRole(string ...$slugs): bool`. Scoped grep across helpdesk controllers + services finds zero callers: `grep -rn "hasAnyRole" platform/src/Controllers/Helpdesk platform/src/Services/Helpdesk | grep -v "function hasAnyRole"` => 0. The only other hasAnyRole in the repo is an unrelated class (platform/src/Services/Learn/LearnContext.php:72). Sibling HelpdeskContext methods ARE used: tenantEligible() (HealthController.php), actorPair() (HelpdeskAudit.php).
Suggested fix. Delete hasAnyRole() from HelpdeskContext, or refactor the permission/role checks that read $ctx->roles directly to go through it for consistency.
Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.
Patrick Bass
@mobieus