CommunitySupportController

struct CommunitySupportController : APIRouteCollection

The collection of /api/v3/communitysupport/* route endpoints and handler functions for Community Support reports.

Community Support team members (holders of UserRoleType.communitysupport) file reports about things attendees tell them. Anyone on the team, and TwitarrTeam and above (which includes THO and admin), can file and read the reports, change their status, and start or open a discussion thread about one in the private Community Support forum category. Plain moderators have no access to the reports. Everything is recorded in an append-only log.

Important

allowedRoles and minAccess are OR’d by MinUserAccessLevelMiddleware, and minAccess defaults to .banned–so a role-only route that omits minAccess would admit every logged-in user. Every route here sets minAccess explicitly.

Access

  • Throws 403 unless the user is on the Community Support team, or is TwitarrTeam or above. The route middleware already checks this; the in-handler check keeps a route that’s mistakenly registered without the right group from becoming open.

    Declaration

    Swift

    private func guardCanAccess(_ user: UserCacheData) throws

Handlers

Utilities