Scope SearchHelper autocomplete helpers to Current.organization
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=594525) </details> <!--IssueSummary end--> ## What Update the `SearchHelper` autocomplete methods to scope results to `Current.organization` when organization isolation is enabled. ## Why The following methods fetch groups and projects instance-wide with no organization boundary: - **`groups_autocomplete`** — calls `current_user.search_on_authorized_groups(term)` with no organization filter. - **`projects_autocomplete`** — calls `current_user.authorized_projects` with no organization filter. `recent_issues_autocomplete` and `recent_merge_requests_autocomplete` delegate to `Gitlab::Search::RecentIssues` and `Gitlab::Search::RecentMergeRequests` respectively — those are covered in a separate issue. ## Implementation notes - `groups_autocomplete`: chain `.in_organization(Current.organization)` on the group relation when isolation is enabled. - `projects_autocomplete`: pass `organization: Current.organization` to the underlying `ProjectsFinder` or chain `.in_organization` on `current_user.authorized_projects` when isolation is enabled. Confirm which approach is cleaner given the current call. - All changes must be gated on organization isolation being active. ## Files - `app/helpers/search_helper.rb` — `#groups_autocomplete`, `#projects_autocomplete`
issue