Enforce the rate limits for Group file-based import via API
<!--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=285137) </details> <!--IssueSummary end--> ## Problem The `Max Group Import requests per minute per user` [setting](https://docs.gitlab.com/ee/user/group/settings/import_export.html#rate-limits) is not enforced when the user uses the API to issue requests. The user is correctly throttled when making requests through the UI, but the API calls are not limited. ## Background When the [Group Import UI was created](https://gitlab.com/gitlab-org/gitlab/-/issues/211807), we implemented the [rate limit in the UI](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/controllers/import/gitlab_groups_controller.rb#L59), but we missed the implementation for the [API](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/api/group_import.rb) ## Proposed solution Enforce the same group request rate limits through the API, that are already enforced through the UI.
issue