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

Enhance USER_DISABLED_FEATURES to allow disabling change username or full name #31959

Merged
merged 11 commits into from
Oct 5, 2024

Conversation

thezzisu
Copy link
Contributor

@thezzisu thezzisu commented Sep 3, 2024

Fix #31958
Enhanced USER_DISABLED_FEATURES(also EXTERNAL_USER_DISABLE_FEATURES) option in [admin] section.
Added following values:

  • change_username: Disable change username
  • change_full_name: Disable change full name

Progress:

  • Update code
  • Update translations

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 3, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 3, 2024
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Sep 3, 2024
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 3, 2024
@thezzisu thezzisu marked this pull request as ready for review September 3, 2024 14:57
@lunny
Copy link
Member

lunny commented Sep 3, 2024

Please don't submit translations except en-US. We use https://translate.gitea.com to do that work.

@thezzisu thezzisu force-pushed the feat/add-lock-fullname-option branch from 7bcb8a4 to 7128278 Compare September 4, 2024 00:51
@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 4, 2024
@thezzisu
Copy link
Contributor Author

thezzisu commented Sep 4, 2024

Please don't submit translations except en-US. We use https://translate.gitea.com to do that work.

Thank you! Translations re-updated in 7128278.

@techknowlogick
Copy link
Member

Thank you for this PR, are you able to combine this into USER_DISABLED_FEATURES/EXTERNAL_USER_DISABLE_FEATURES? Or if that doesn't make sense, then a more genric option that accepts a list of restricted items from being changed?

@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 12, 2024
@thezzisu
Copy link
Contributor Author

thezzisu commented Sep 12, 2024

Thank you for this PR, are you able to combine this into USER_DISABLED_FEATURES/EXTERNAL_USER_DISABLE_FEATURES? Or if that doesn't make sense, then a more genric option that accepts a list of restricted items from being changed?

Thank you for your advice! I have updated my implementation and now its using USER_DISABLED_FEATURES to work.

Detailed description also updated in the first comment of this PR.

@thezzisu thezzisu changed the title Add ExternalUserLockFullName option Enhance USER_DISABLED_FEATURES to allow disabling change username or full name Sep 13, 2024
@thezzisu
Copy link
Contributor Author

Action db-tests / test-mssql seems to be broken.

@lunny
Copy link
Member

lunny commented Sep 22, 2024

Action db-tests / test-mssql seems to be broken.

This has been resolved.

@lunny lunny added the docs-update-needed The document needs to be updated synchronously label Sep 28, 2024
@lunny
Copy link
Member

lunny commented Sep 28, 2024

app.example.ini should be updated and a documentation PR should be created in https://gitea.com/gitea/docs

@thezzisu
Copy link
Contributor Author

USER_DISABLED_FEATURES

Thank you! app.example.ini is updated and related docs is in a PR via https://gitea.com/gitea/docs/pulls/76

@manishramanandi
Copy link

hey i want to contribute can you explain me a lil bit more??

@lunny
Copy link
Member

lunny commented Oct 2, 2024

This is pull request to resolve the problem, not the issue.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 4, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 4, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 5, 2024
@lunny lunny enabled auto-merge (squash) October 5, 2024 20:11
@lunny lunny merged commit 66923e0 into go-gitea:main Oct 5, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Oct 5, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 5, 2024
@lunny lunny modified the milestones: 1.24.0, 1.23.0 Oct 7, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Oct 8, 2024
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Allow filtering PRs by poster in the ListPullRequests API (go-gitea#32209)
  Fix bug when there are multiple triggers with workflow dispatch (go-gitea#32200)
  [skip ci] Updated licenses and gitignores
  [skip ci] Updated translations via Crowdin
  Upgrade htmx to 2.0.3 (go-gitea#32192)
  Enhance USER_DISABLED_FEATURES to allow disabling change username or full name (go-gitea#31959)
  [skip ci] Updated translations via Crowdin
  Add support for searching users by email (go-gitea#30908)
  Fix PR creation on forked repositories (go-gitea#31863)
  [skip ci] Updated translations via Crowdin
  Fixed race condition when deleting documents by repoId in ElasticSearch (go-gitea#32185)
  add {{TEST_MINIO_ENDPOINT}} for local testing "with/without" docker + fix pgsql testing doc (go-gitea#32105)
  [skip ci] Updated translations via Crowdin
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs-update-needed The document needs to be updated synchronously lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to lock full name when using external auth sources
5 participants