Add option to disable username changing
Created by: raphendyr
When gitlab is used with ldap or pam for authentication, we might want to disable username changing.
We found out that you can reserve another users username before another user logs in first time and thus disabling the service from him.
Merge request reports
Activity
64 .input 65 = f.text_field :username, required: true 66 67 %span.loading-gif.hide= image_tag "ajax_loader.gif" 68 %span.update-success.cgreen.hide 69 %i.icon-ok 70 Saved 71 %span.update-failed.cred.hide 72 %i.icon-remove 73 Failed 74 %ul.cred 75 %li It will change web url for personal projects. 76 %li It will change the git path to repositories for personal projects. 77 .input 78 = f.submit 'Save username', class: "btn save-btn" 56 if current_user.can_change_username? 64 .input 65 = f.text_field :username, required: true 66 67 %span.loading-gif.hide= image_tag "ajax_loader.gif" 68 %span.update-success.cgreen.hide 69 %i.icon-ok 70 Saved 71 %span.update-failed.cred.hide 72 %i.icon-remove 73 Failed 74 %ul.cred 75 %li It will change web url for personal projects. 76 %li It will change the git path to repositories for personal projects. 77 .input 78 = f.submit 'Save username', class: "btn save-btn" 56 if current_user.can_change_username? Created by: raphendyr
Good idea, looks a lot better. Also makes possible to allow username changing per user (eq. admins).
I look if I can implement it. Not yet so familiar with ruby nor rails etc.
By Administrator on 2013-02-02T19:26:21 (imported from GitLab project)
By Administrator on 2013-02-02T19:26:21 (imported from GitLab)
215 215 keys.count == 0 216 216 end 217 217 218 def can_change_username? 219 Gitlab.config.gitlab.username_changing_enabled Created by: raphendyr
I have no idea about the test side of the gitlab/rails/whatever. :D So, I'm sorry, I can't or at least not without lot of effort. I should learn though...
By Administrator on 2013-02-03T20:16:04 (imported from GitLab project)
By Administrator on 2013-02-03T20:16:04 (imported from GitLab)
Created by: raphendyr
I looked bit onto testing. Is this something you had in mind? https://gist.github.com/4707649
By Administrator on 2013-02-04T16:02:00 (imported from GitLab project)
By Administrator on 2013-02-04T16:02:00 (imported from GitLab)