Skip to content

Only set the user password if the password field would have been shown#12980

Merged
zeripath merged 2 commits into
go-gitea:masterfrom
zeripath:fix-12952-only-check-password-field-on-admin-page-if-it-was-shown
Sep 29, 2020
Merged

Only set the user password if the password field would have been shown#12980
zeripath merged 2 commits into
go-gitea:masterfrom
zeripath:fix-12952-only-check-password-field-on-admin-page-if-it-was-shown

Conversation

@zeripath
Copy link
Copy Markdown
Contributor

POSTing to /admin/users/:id should only set/check the password if the the user IsLocal() or IsOauth2()

Fix #12952

Signed-off-by: Andrew Thornton art27@cantab.net

POSTing to /admin/users/:id should only set the password if the the user
IsLocal or IsOauth2

Fix go-gitea#12952

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.13.0 milestone Sep 29, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Sep 29, 2020
@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 Sep 29, 2020
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 29, 2020

Codecov Report

Merging #12980 into master will increase coverage by 0.03%.
The diff coverage is 30.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12980      +/-   ##
==========================================
+ Coverage   42.54%   42.58%   +0.03%     
==========================================
  Files         670      671       +1     
  Lines       73522    73627     +105     
==========================================
+ Hits        31281    31353      +72     
- Misses      37175    37187      +12     
- Partials     5066     5087      +21     
Impacted Files Coverage Δ
cmd/dump.go 0.90% <0.00%> (-0.13%) ⬇️
cmd/migrate_storage.go 0.00% <0.00%> (ø)
models/admin.go 69.09% <0.00%> (-2.61%) ⬇️
models/repo.go 55.15% <0.00%> (+0.04%) ⬆️
modules/storage/minio.go 0.00% <0.00%> (-48.44%) ⬇️
routers/admin/users.go 25.71% <0.00%> (ø)
routers/install.go 0.00% <0.00%> (ø)
routers/repo/lfs.go 0.00% <0.00%> (ø)
modules/storage/local.go 38.09% <5.88%> (-11.91%) ⬇️
modules/setting/storage.go 43.47% <43.47%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b6361f...fefeb07. Read the comment docs.

@6543
Copy link
Copy Markdown
Member

6543 commented Sep 29, 2020

🚀

@zeripath zeripath merged commit 1bcf1ad into go-gitea:master Sep 29, 2020
@zeripath zeripath deleted the fix-12952-only-check-password-field-on-admin-page-if-it-was-shown branch September 29, 2020 20:27
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can not save ldap-user config in site admin page.

5 participants