Allow bulk additions to group IP address restrictions via the UI
<!--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=468998) </details> <!--IssueSummary end--> ### Summary Within the GitLab UI, there is an option to [Restrict group access by IP address](https://docs.gitlab.com/ee/user/group/access_and_permissions.html#restrict-group-access-by-ip-address). Currently, this appears to only allow manually entering in a single IP address or range at a time, and it won't parse a list of IPs or ranges all at once. The [guidance within the documentation for this feature](https://gitlab.com/gitlab-org/gitlab/-/blob/v17.1.0-ee/doc/user/group/access_and_permissions.md?plain=1&ref_type=tags#L80) states: > In the **Restrict access by IP address** text box, enter a list of IPv4 or IPv6 The reality is that you can only create a listing by manually inputting single IP addresses or ranges at a time. You can't actually input a whole list. In testing, this behavior was replicated on: * GitLab.com - GitLab Enterprise Edition 17.2.0-pre cbb2dbfcd9a * Within Firefox 127.0 ### What is the current behavior? 1. Within a group, go to `Settings > General > Permissions and group features` 2. Attempt to add a listing of IP addresses or ranges into `Restrict access by IP address`. For example you can try with a comma delimiter - `192.168.3.0/24, 172.33.12.0/24` or alternatively with a space or newline delimiter. 3. The result will always be the same, you'll see a pop-up box that states `... is an invalid IP address range`. So if you have a large listing of IP addresses / ranges you wish to add, the only way to do so _via the UI_ is to add them individually. ![2024-06-26_10-31](/uploads/dfb42e50d05a14a31e15d73e7cdc97c5/2024-06-26_10-31.png){width=854 height=291} ### What is the desired behavior? The desired behavior would be to be able to paste in a whole listing of IP addresses or ranges, and have them parsed through. ### Workarounds The current alternative is to utilize the Groups API. Specifically, it's the `ip_restriction_ranges` attribute that can be used as a string in a comma-separated format. - [Groups API - Update group](https://docs.gitlab.com/ee/api/groups.html#update-group)
issue