Skip to content

Document 403 on List and Search activity logs - #823

Open
bscanlan wants to merge 2 commits into
mainfrom
brian.scanlan/activity-logs-403
Open

bscanlan wants to merge 2 commits into
mainfrom
brian.scanlan/activity-logs-403

Conversation

@bscanlan

@bscanlan bscanlan commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Why?

GET /admins/activity_logs and POST /admins/activity_logs/search now return 403 with error code action_forbidden when the access token acts as a teammate who lacks the permission to access all teammates and team details. Tokens that act for the whole workspace, with no teammate behind them, are unaffected.

How?

Documents that response, with an example error, on both endpoints in every API version that has them.

API Versions Affected

GET /admins/activity_logs:

  • Preview
  • v2.7
  • v2.8
  • v2.9
  • v2.10
  • v2.11
  • v2.12
  • v2.13
  • v2.14
  • v2.15
  • v2.16
  • v2.17
  • v2.18

POST /admins/activity_logs/search:

  • Preview
  • v2.16
  • v2.17
  • v2.18

🤖 Generated with Claude Code

https://claude.ai/code/session_01PgoPJbcSxvox5NNgHTbcGH

bscanlan and others added 2 commits November 19, 2026 13:31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PgoPJbcSxvox5NNgHTbcGH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PgoPJbcSxvox5NNgHTbcGH
@bscanlan bscanlan changed the title Document 403 on List all activity logs Document 403 on List and Search activity logs Nov 19, 2026

@geetikabagga geetikabagga left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving.

Checked and fine at b31d88d against intercom master 9d215481a (#621034 merged as 8f4f75851):

  • The documented response matches the implementation. ensure_full_bpo_access! runs before both activity_logs and search_activity_logs and raises 403 with ACTION_FORBIDDEN ('action_forbidden') and the exact message in the example (admins_controller.rb:15, 316-323).
  • "Tokens that act for the whole workspace are unaffected" is accurate. bpo_restricted? needs a non-nil current_admin that isn't an operator (admins_controller.rb:333-334).
  • The check isn't version-gated, and coverage is complete. Every version file that has GET /admins/activity_logs (0, 2.7–2.18) or POST /admins/activity_logs/search (0, 2.16–2.18) now has exactly one 403 on that operation.

~ Automated via Claude

This branch has not been deployed

No deployments
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.

2 participants