feat(web): owner-wide activity log query for the audit-log dump#131
Merged
Conversation
Add `activityLog: [ActivityEntry!]!` — the caller's complete activity log
across ALL their courses, newest first, UNCAPPED (the per-assignment and
per-course reads stay capped at 200; a dump must be complete, and one
user's audit trail is bounded in practice). ActivityEntry now also exposes
`course`, needed to tell cross-course entries apart.
- db.AllActivityFor(owner): owner-only read via the shared, now
limit-parameterised findActivity; a new {owner:1, at:-1} index backs it.
- app.ActivityLog + resolver; toGraphActivity maps course.
Backs the /activity page and its JSON download in glabs.gui.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Kleinkram: das Audit-Log-Dump (Backend-Teil). Der GUI-Teil (
/activity-Seite + JSON-Download) folgt in glabs.gui.Inhalt
activityLog: [ActivityEntry!]!— der komplette Verlauf des Aufrufers über alle Kurse, neueste zuerst, ungecappt (die per-Assignment-/per-Kurs-Reads bleiben bei 200; ein Dump muss vollständig sein, und der Audit-Trail eines Users ist praktisch beschränkt). Owner-scoped wie alles.ActivityEntryexponiert jetzt zusätzlichcourse(nötig, um kurs-übergreifende Einträge zu unterscheiden).db.AllActivityFor(owner)— owner-only-Read über das jetzt limit-parametrisiertefindActivity(Invariante „kein Read ohne Owner-Filter" bleibt); neuer Index{owner:1, at:-1}.app.ActivityLog+ Resolver;toGraphActivitymapptcourse.Verifikation
go build/go vet/go vet -tags=integration/go test ./.../golangci-lint— alle grün.{ activityLog { course op status at } }→{"data":{"activityLog":[]}}(Query serviert real).🤖 Generated with Claude Code