feat(api): audit log read endpoints for admin and enterprise#3343
Merged
waleedlatif1 merged 3 commits intostagingfrom Feb 25, 2026
Merged
feat(api): audit log read endpoints for admin and enterprise#3343waleedlatif1 merged 3 commits intostagingfrom
waleedlatif1 merged 3 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR adds comprehensive audit log read endpoints for both admin and enterprise users. The implementation follows established patterns in the codebase and addresses previous review feedback. Key changes:
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Client Request] --> B{Endpoint Type?}
B -->|Enterprise| C[Rate Limit Check]
B -->|Admin| D[Admin Auth Check]
C --> E[validateEnterpriseAuditAccess]
E --> F{Org Member?}
F -->|No| G[403 Error]
F -->|Yes| H{Admin/Owner Role?}
H -->|No| G
H -->|Yes| I{Enterprise Subscription?}
I -->|No| G
I -->|Yes| J[Get Org Member IDs]
J --> K{includeDeparted?}
K -->|Yes| L[Query by actorId OR workspaceId]
K -->|No| M[Query by actorId only]
L --> N[Apply Filters & Cursor]
M --> N
N --> O[Return Data excluding IP/UserAgent]
D --> P[Query All Logs]
P --> Q[Apply Filters]
Q --> R[Return All Data including IP/UserAgent]
Last reviewed commit: 2f08f6e |
cb9fd08 to
2f08f6e
Compare
Collaborator
Author
|
@cursor review |
Collaborator
Author
|
@greptile |
waleedlatif1
added a commit
that referenced
this pull request
Feb 25, 2026
* feat(api): audit log read endpoints for admin and enterprise * fix(api): address PR review — boolean coercion, cursor validation, detail scope * ran lint
waleedlatif1
added a commit
that referenced
this pull request
Feb 25, 2026
* feat(workflow): lock/unlock workflow from context menu and panel * lint * fix(workflow): prevent duplicate lock notifications, no-op guard, fix orphaned JSDoc * improvement(workflow): memoize hasLockedBlocks to avoid inline recomputation * feat(google-translate): add Google Translate integration (#3337) * feat(google-translate): add Google Translate integration * fix(google-translate): api key as query param, fix docsLink, rename tool file * feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar (#3338) * feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar * fix(google-drive): remove dead transformResponse from move tool * feat(confluence): return page content in get page version tool (#3344) * feat(confluence): return page content in get page version tool * lint * feat(api): audit log read endpoints for admin and enterprise (#3343) * feat(api): audit log read endpoints for admin and enterprise * fix(api): address PR review — boolean coercion, cursor validation, detail scope * ran lint * unified list of languages for google translate * fix(workflow): respect snapshot view for panel lock toggle, remove unused disableAdmin prop * improvement(canvas-menu): remove lock icon from workflow lock toggle * feat(audit): record audit log for workflow lock/unlock
waleedlatif1
added a commit
that referenced
this pull request
Feb 26, 2026
* feat(workflow): lock/unlock workflow from context menu and panel * lint * fix(workflow): prevent duplicate lock notifications, no-op guard, fix orphaned JSDoc * improvement(workflow): memoize hasLockedBlocks to avoid inline recomputation * feat(google-translate): add Google Translate integration (#3337) * feat(google-translate): add Google Translate integration * fix(google-translate): api key as query param, fix docsLink, rename tool file * feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar (#3338) * feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar * fix(google-drive): remove dead transformResponse from move tool * feat(confluence): return page content in get page version tool (#3344) * feat(confluence): return page content in get page version tool * lint * feat(api): audit log read endpoints for admin and enterprise (#3343) * feat(api): audit log read endpoints for admin and enterprise * fix(api): address PR review — boolean coercion, cursor validation, detail scope * ran lint * unified list of languages for google translate * fix(workflow): respect snapshot view for panel lock toggle, remove unused disableAdmin prop * improvement(canvas-menu): remove lock icon from workflow lock toggle * feat(audit): record audit log for workflow lock/unlock
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.
Summary
GET /v1/admin/audit-logs(list with filtering/pagination) andGET /v1/admin/audit-logs/[id]GET /v1/audit-logs(org-scoped, cursor pagination) andGET /v1/audit-logs/[id]includeDepartedparam for enterprise list to include departed member logsType of Change
Testing
Tested manually
Checklist