Add configuration of access_level for runners on registration
What does this MR do?
Allows users to use the gitlab-runner register --access-level="ref_protected"
to be able to set the access-level at registration rather than via the UI/API. This speeds up the registration process and also helps to close a minor security issue between the registration of a runner and the time when it is set to protected via UI/API.
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27490 for the Rails side of the code to accept the API request from gitlab-runner
Why was this MR needed?
See #3186 (closed)
Are there points in the code the reviewer needs to double check?
Does this MR meet the acceptance criteria?
-
Documentation created/updated -
Added tests for this feature/bug -
In case of conflicts with master
- branch was rebased
What are the relevant issue numbers?
Closes #3186 (closed)