Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add login-prefix config option for created logins #29

Merged
merged 2 commits into from
Jan 29, 2022

Conversation

gagbo
Copy link
Collaborator

@gagbo gagbo commented Oct 29, 2021

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 option ktra-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

Defaults to the currently used value `ktra-secure-auth:` so it is a
backwards compatible change.
This is the stub based on actions-rs quickstart, augmented with a matrix
strategy to test all database managers
@moriturus moriturus changed the base branch from main to another_main January 29, 2022 15:03
@moriturus moriturus merged commit 792844d into moriturus:another_main Jan 29, 2022
@gagbo gagbo deleted the feat/config_login_prefix branch March 25, 2022 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants