feat(support): let compliance view and handle support tickets#3983
Open
joshuakrueger-dfx wants to merge 1 commit into
Open
feat(support): let compliance view and handle support tickets#3983joshuakrueger-dfx wants to merge 1 commit into
joshuakrueger-dfx wants to merge 1 commit into
Conversation
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.
0070cab to
8d19f38
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-issue.service(list/counts/activity) filters issues bydepartment IN (...)from this helper; the list still accepts an optional?department=to narrow within the allowed set (UI tab).support-notevisibility 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 inRESTRICTED_ROLES, and may answer tickets / read protected KYC files). No new column, migration, JWT change or endpoint required.Tests
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.