Draft: Create Projects::DeployTokens::RevokeService
requested to merge gitlab-community/gitlab:499958-nwittstruck-project-deploy-token-revoke into master
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo.
What does this MR do and why?
This MR is a preparation for !170421
Until now, there was no RevokeService
for project deploy tokens, only for group deploy tokens.
In order to be able to revoke deploy tokens with the new Admin Token Revoke API
, we also need to support project deploy tokens. Right now, only group deploy tokens can be revoked using the API. This would be rather confusing, so this MR adds a RevokeService for projects as well.
Issue: #499958
MR acceptance checklist
MR Checklist ( @nwittstruck)
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
How to set up and validate locally
This MR uses the new Projects::DeployTokens::RevokeService to revoke the deploy tokens, instead of just doing it in the controller. Therefore, you can test that the existing behaviour still works by creating and revoking a new project token:
- Create a project deploy token
- Revoke the project deploy token
Related to #499958
Edited by 🤖 GitLab Bot 🤖