Skip to content

feat(support): let compliance view and handle support tickets#3983

Open
joshuakrueger-dfx wants to merge 1 commit into
developfrom
feat/support-combined-compliance-role
Open

feat(support): let compliance view and handle support tickets#3983
joshuakrueger-dfx wants to merge 1 commit into
developfrom
feat/support-combined-compliance-role

Conversation

@joshuakrueger-dfx

@joshuakrueger-dfx joshuakrueger-dfx commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

What

Per review feedback: instead of a generic multi-role system, compliance simply becomes a superset of support. A compliance user now sees and answers support department tickets (and notes) in addition to their own compliance ones. Support is unchanged.

Why

Staff with the compliance role need to handle support tickets too. The requirement is "everything support may do, compliance may do as well" — so the right is added to compliance, asymmetrically (support stays support-only).

How

A single helper drives department visibility:

// support      -> [Support]
// compliance   -> [Support, Compliance]   // superset of support
// marketing    -> [Marketing]
// admin/super  -> undefined (unrestricted)
getVisibleDepartments(role)
  • support-issue.service (list / counts / activity) filters issues by department IN (...) from this helper; the list still accepts an optional ?department= to narrow within the allowed set (UI tab).
  • support-note visibility uses the same helper, so compliance also sees support notes. Note creation still stamps the author's home department (compliance), unchanged.

Everything else already grants compliance ≥ support (it passes the RoleGuard(Support) endpoints, gets the broader column-update set, is not in RESTRICTED_ROLES, and may answer tickets / read protected KYC files). No new column, migration, JWT change or endpoint required.

Tests

  • New unit test for getVisibleDepartments (support / compliance-superset / marketing / admin-unrestricted).
  • tsc + ESLint + Prettier clean.

Scope

3 files + 1 test. No DB migration, no API contract change, no frontend change required.

Compliance becomes a superset of support: it now sees and answers support
department tickets and notes in addition to its own, via getVisibleDepartments
(support -> support; compliance -> support + compliance). Support is unchanged.
All other support-tool rights already grant compliance >= support.
@joshuakrueger-dfx joshuakrueger-dfx force-pushed the feat/support-combined-compliance-role branch from 0070cab to 8d19f38 Compare June 26, 2026 16:14
@joshuakrueger-dfx joshuakrueger-dfx changed the title feat(auth): support multiple roles per user feat(support): let compliance view and handle support tickets Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant