Skip to content

Add option to change username to the admin panel #2129

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

Closed
wants to merge 7 commits into from

Conversation

Bwko
Copy link
Member

@Bwko Bwko commented Jul 8, 2017

Adds #1818

@Bwko Bwko force-pushed the change_username branch from 01906eb to 5bfa5e0 Compare July 8, 2017 23:53
Copy link
Member

@lafriks lafriks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UserName can be allowed to change only for internal users

@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jul 9, 2017
@lunny lunny added this to the 1.x.x milestone Jul 9, 2017
@Bwko Bwko force-pushed the change_username branch from 5bfa5e0 to 76a2a81 Compare July 9, 2017 11:34
@Bwko
Copy link
Member Author

Bwko commented Jul 9, 2017

@lafriks added

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 9, 2017
@lafriks
Copy link
Member

lafriks commented Jul 9, 2017

Integration test would be nice for this

@Bwko Bwko force-pushed the change_username branch from 76a2a81 to 6a1b9fd Compare July 11, 2017 20:46
@Bwko Bwko force-pushed the change_username branch from 6a1b9fd to 68964b2 Compare July 13, 2017 22:14
@Bwko Bwko force-pushed the change_username branch 2 times, most recently from 8636454 to 42357e4 Compare July 28, 2017 19:57
@Bwko Bwko force-pushed the change_username branch from 42357e4 to 2c5edbd Compare July 28, 2017 20:05
@Bwko
Copy link
Member Author

Bwko commented Jul 28, 2017

@lafriks I've added some tests

@Bwko
Copy link
Member Author

Bwko commented Oct 26, 2017

This one is ready for review

@@ -205,6 +205,14 @@ func EditUserPost(ctx *context.Context, form auth.AdminEditUserForm) {
u.EncodePasswd()
}

if u.IsLocal() && len(form.UserName) > 0 && u.Name != form.UserName {
if err := models.ChangeUserName(u, form.UserName); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think models.ChangeUserName and models.UpdateUser should be with a transaction.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bwko any update for this?

@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 29, 2018
@6543
Copy link
Member

6543 commented Dec 28, 2019

@Bwko what's the state?

@a1012112796
Copy link
Member

state of this pr?

@6543
Copy link
Member

6543 commented Jan 3, 2021

followup: #14229

@6543 6543 closed this Jan 3, 2021
@6543 6543 removed this from the 1.x.x milestone Jan 3, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Feb 11, 2021
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/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants