Loading
Reserve token type prefixes as instance token prefix
What does this MR do and why?
An instance prefix equal to a token type prefix without its hyphen made other tokens look like that type. For example, with "glcbt", new personal access tokens ("glcbt-glpat-...") were detected as CI job tokens and rejected by the API.
This MR reserves all token type prefixes, derived from the model constants.
References
How to set up and validate locally
- Enable the feature flag:
Feature.enable(:custom_prefix_for_all_token_types) - Go to Admin area > Settings > General > Account and limit, set Instance token prefix to e.g.
glcbt. You should see the error "Instance token prefix is reserved and cannot be used" appears.
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
Related to #388379 (closed)
Edited by Nicholas Wittstruck