add must-change-password flag to change-password command #675

Closed
william-elastisys wants to merge 1 commits from main into main
william-elastisys commented 2024-07-04 14:50:43 +00:00 (Migrated from gitea.com)

Description of the change

When using a non-default admin user, the change-password command would require the admin to update the password each time gitea is restared/upgraded.

I'm not sure if there's a reason to have this configureable so I just added the option for now to match the command above.

Benefits

Possible drawbacks

Applicable issues

Additional information

⚠ BREAKING

Checklist

  • Parameters are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Breaking changes are documented in the README.md
  • Templating unittests are added
<!-- Before you open the request please review the following guidelines and tips to help it be more easily integrated: - Describe the scope of your change - i.e. what the change does. - Describe any known limitations with your change. - Please run any tests or examples that can exercise your modified code. Thank you for contributing! We will try to review, test and integrate the change as soon as we can. --> ### Description of the change When using a non-default admin user, the change-password command would require the admin to update the password each time gitea is restared/upgraded. I'm not sure if there's a reason to have this configureable so I just added the option for now to match the command above. ### Benefits <!-- What benefits will be realized by the code change? --> ### Possible drawbacks <!-- Describe any known limitations with your change --> ### Applicable issues <!-- Enter any applicable Issues here (You can reference an issue using #). Please remove this section if there is no referenced issue. --> - fixes #673 ### Additional information <!-- If there's anything else that's important and relevant to your pull request, mention that information here. Please remove this section if it remains empty. --> ### ⚠ BREAKING <!-- If there's a breaking change, please shortly describe in which way users are affected and how they can mitigate it. If there are no breakings, please remove this section. --> ### Checklist <!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] --> - [ ] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) - [ ] Breaking changes are documented in the `README.md` - [ ] Templating unittests are added
justusbunsi (Migrated from gitea.com) reviewed 2024-07-04 14:50:43 +00:00
pat-s (Migrated from gitea.com) reviewed 2024-07-04 14:50:43 +00:00
pat-s commented 2024-07-04 15:22:58 +00:00 (Migrated from gitea.com)

Thanks! As @justusbunsi already pointed out, we should make that configurable.

I haven't had a chance yet to test this out with a non-default admin user, just wondering why it seems to only apply there and not to gitea_admin (as I couldn't reproduce it with it a few days ago).

Thanks! As @justusbunsi already pointed out, we should make that configurable. I haven't had a chance yet to test this out with a non-default admin user, just wondering why it seems to only apply there and not to `gitea_admin` (as I couldn't reproduce it with it a few days ago).
solacelost commented 2024-07-04 15:34:43 +00:00 (Migrated from gitea.com)

...I will close my PR that does the exact same thing as you opened this after I'd gotten mad and checked for it, lol.

...I will close my PR that does the exact same thing as you opened this after I'd gotten mad and checked for it, lol.
william-elastisys commented 2024-07-04 15:42:59 +00:00 (Migrated from gitea.com)

Thanks! As @justusbunsi already pointed out, we should make that configurable.

Do you mean to be able to configure true|false for that option? If setting it to true wouldn't that mean having to change the admin password every time gitea is restarted? (the current situation with a custom username)

> Thanks! As @justusbunsi already pointed out, we should make that configurable. Do you mean to be able to configure `true|false` for that option? If setting it to `true` wouldn't that mean having to change the admin password every time gitea is restarted? (the current situation with a custom username)
solacelost commented 2024-07-04 16:13:37 +00:00 (Migrated from gitea.com)

I was thinking about this and I think three possible modes sounds useful.

  • Initial password only, never update, require change on sign in
  • Initial password only, never update, don't require change
  • Always set/update, never require change

I have thoughts on how best to implement this. Any thoughts on this approach?

I was thinking about this and I think three possible modes sounds useful. - Initial password only, never update, require change on sign in - Initial password only, never update, don't require change - Always set/update, never require change I have thoughts on how best to implement this. Any thoughts on this approach?
pat-s commented 2024-07-05 09:54:53 +00:00 (Migrated from gitea.com)

@william-elastisys Are you fine focusing on #677 to solve this particular issue? I don't think we would issue a hot fix here but rather focus on a robust solution as started in #677. You are of course welcome to comment/contribute there if you want!

@william-elastisys Are you fine focusing on #677 to solve this particular issue? I don't think we would issue a hot fix here but rather focus on a robust solution as started in #677. You are of course welcome to comment/contribute there if you want!
william-elastisys commented 2024-07-05 10:26:39 +00:00 (Migrated from gitea.com)

Yes, sounds good to make it configurable, would be nice to create a new release when that PR is done as we are blocked from upgrading to gitea 1.22 currently 👍

Yes, sounds good to make it configurable, would be nice to create a new release when that PR is done as we are blocked from upgrading to gitea 1.22 currently :+1:

Pull request closed

Sign in to join this conversation.
No description provided.