Gitlab API: implement the ability to use group_id or user_id to protect tags

Problem to solve

Gitlab API for Protected tags doesn't support advanced protection like protected branches API and protected environments API:

  • it is only possible to set role access level via create_access_level but
  • it is NOT possible to set allowed_to_create by group_id or user_id.

Proposal

Implement the ability to also use group_id or user_id to protect tags like for protected environments API and protected branches API.

Essentially, after this would be introduced the documentation would look as proposed in !91586 (merged)

Links / references

Take note of the other issues that are essentially asking for the same:

Customers

issue customer & detail ask contact
this issue here https://gitlab.zendesk.com/agent/tickets/247805
group_id
@atanayno, @shoyle1
Gitlab API: Protected tags must be same as Bran... (#255305 - closed) https://gitlab.zendesk.com/agent/tickets/224099
user_id
@hchouraria
Gitlab API: Protected tags must be same as Bran... (#255305 - closed) https://gitlab.zendesk.com/agent/tickets/173875 *
allowed_to_create and allowed_to_unprotect by user_id
 @swainaina
this issue here https://gitlab.zendesk.com/agent/tickets/290486
group_id and user_id
@duncan_harris, @conleyr
this issue here https://gitlab.zendesk.com/agent/tickets/247893
group_id
@rotanak
Cannot set groupID or userID for protected tag ... (#323830 - closed) https://gitlab.zendesk.com/agent/tickets/208158
user_id
@asmaa.hassan
Cannot set groupID or userID for protected tag ... (#323830 - closed) https://gitlab.my.salesforce.com/0064M00000ZFD4B @jrandazzo
Docs feedback - Allow API access to set protect... (#330373 - closed) group_id
Gitlab's UI and API discrepancy (#12987 - closed) group_id and user_id

* One customer asked for allowed_to_unprotect. There, did not seem to be a use case reason, just simply to make Protected Tags API fully on par with Protected Branches API and Protected Environments API, I suppose for consistency reasons. In the interest of our value Iteration, we will not add allowed_to_unprotect.

roughly 10 upvotes in total

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by Torsten Linz