Source Code: Organizations - Activity Stream: Add organization filtering to user-level event paths
## Overview Remediation steps identified following audit of Organizations compatibility. ## Related Issues * https://gitlab.com/gitlab-com/gl-infra/tenant-scale/organizations/organizations-feature-parity/-/work_items/11 ## Description Organizations: [Activity Stream Assessment](https://gitlab.com/gitlab-com/gl-infra/tenant-scale/organizations/organizations-feature-parity/-/work_items/11#note_3136424188) _Activity stream events may span organization boundaries._ ## Issues Identified * [ ] `EventsFinder` (`app/finders/events_finder.rb`) has no `organization_id` reference anywhere. `by_current_user_access` scopes to `Project.public_or_visible_to_user(current_user)` — visibility-scoped but not org-scoped. * [ ] `GET /events` with `scope: 'all'` returns `EventCollection.new(current_user.authorized_projects).all_project_events` — all projects across all orgs. * [ ] `GET /users/:id/events` returns the target user's events filtered by project visibility, not org membership. * [ ] `UserRecentEventsFinder` (used by `UsersController#activity` and the dashboard) queries `Event.where(author: target_user)` with no org filter. * [ ] The `events` table itself has no `organization_id` column — sharding is by `project_id`/`group_id`/`personal_namespace_id`.
issue