che-server
che-server copied to clipboard
Remove redundan PATs on refresh mode
What does this PR do?
Iterate over personal access token secrets on refresh function. Remove outdated token secrets except the latest refreshed token secret.
Screenshot/screencast of this PR
What issues does this PR fix or reference?
fixes https://github.com/eclipse-che/che/issues/23027
How to test this PR?
- Deploy che with the pr image:
quay.io/eclipse/che-server:pr-
- Configure gitlab oauth
- Apply refresh mode
- Start a workspace from gitlab repository with a devfile.
- Go to Dashboard user preferences -> personal access tokens
- See: only one personal access token item is present in the list
PR Checklist
As the author of this Pull Request I made sure that:
- [x] The Eclipse Contributor Agreement is valid
- [x] Code produced is complete
- [x] Code builds without errors
- [x] Tests are covering the bugfix
- [ ] The repository devfile is up to date and works
- [ ] Sections
What issues does this PR fix or reference
andHow to test this PR
completed - [ ] Relevant user documentation updated
- [ ] Relevant contributing documentation updated
- [ ] CI/CD changes implemented, documented and communicated
Reviewers
Reviewers, please comment how you tested the PR when approving it.