Add login-prefix config option for created logins #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
First, thanks for ktra, it looks like it covers my needs to get a quickly setup for a private registry !
Since there may be a few things that I wanted to tweak (possibly looking into OAuth if I get the courage), I tried to force myself to look into the code by implementing a small feature: I noticed that there is a prefix before the username for all DB related operations, and it was hard coded. I thought it'd be great if it were possible to customize the user_login prefix as well to make ktra feel more "personal". I had to type
cargo owners --registry ktra --add ktra-secure-auth:gagbo
to add an owner, so I thought changing the prefix would be nice as it ends up in the API the users have to use.The added config option goes under the
db_config
section, and defaults to the previously hardcoded optionktra-secure-auth:
if absent: so the change is backwards compatible.Feel free to discard it if you think it's unnecessary, I didn't really create an issue or discussed this point before coming with a patch.
Hopefully I can try to help a little with #28. We're all busy but if we can each give a little time it would probably work out 🤞
Regards,
Gerry