feat: support tickets between accounts and platform admins
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 7m0s
ci / test (pull_request) Successful in 12m1s
ci / build (pull_request) Successful in 18m14s
ci / image (pull_request) Successful in 5m9s

Accounts open tickets under Support and admins answer them under Admin →
Support tickets.

- A ticket is open while it waits for the admins and answered while it
  waits for the account. Either side can close or reopen it, and a reply
  reopens it.
- The admins are mailed about new tickets and replies, and the account
  about answers.
- A ticket can name the active organization and point at a monitor,
  notification channel, alert group, status page or incident in it.
  Each must be something the account can read.
- Next to the conversation, admins see the account at a glance: state,
  sign-in, organizations with their limits and usage, and open tickets.
- Admins switch support off and limit how many tickets an account has
  open at once.
- Suspended accounts and those yet to accept the terms reach support too;
  a suspended account opens one ticket.
- Tickets are part of the account export and are deleted with the
  account.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-24 18:01:50 +01:00
1 parent 9fc3c6b050
commit f3d402705e
25 files changed
+5296 -451

No files matched your search

+5 -2
View File
@@ -132,11 +132,13 @@ func (s *Server) accessOf(ctx context.Context, user uuid.UUID) (access, error) {
}
// restrictedPaths stay open to accounts that are suspended or have yet to
// accept the documents. Admins keep editing the documents, which they may
// be publishing one after the other; the handlers still check they are.
// accept the documents, support included: a suspended account may want to
// ask why. Admins keep editing the documents, which they may be publishing
// one after the other; the handlers still check they are.
var restrictedPaths = []string{
"/consent", "/account/suspended", "/legal/",
"/api/v1/auth/", "/api/v1/consent", "/api/v1/me/export", "/api/v1/me/delete", "/api/v1/locale",
"/support", "/support/", "/api/v1/support/",
"/admin/legal", "/api/v1/admin/legal/",
}
@@ -249,6 +251,7 @@ func (s *Server) restrictedMe(c *gin.Context, sess *auth.Session) (web.Me, error
return web.Me{}, err
}
me := toWebMe(m)
me.Support = s.supportSettings(c.Request.Context()).Enabled
me.DeletesOrgs, err = s.lastOwnedOrgs(c.Request.Context(), sess.UserID)
return me, err
}