summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJaakko Kantojärvi <jaakko@n-1.fi>2013-01-30 22:14:34 +0200
committerJaakko Kantojärvi <jaakko@n-1.fi>2013-02-14 17:58:56 +0200
commitba65f2910b1285217326028655de057a702572af (patch)
tree391cce80e2111d77a2695e99a518746ffe75a0f5 /config
parent04186e9797209ff5a9b2fd4025d458a6e2223f62 (diff)
downloadgitlab-ce-ba65f2910b1285217326028655de057a702572af.tar.gz
Add option to disable username changing
This option allows to disable users from changing their username. This is very usefull in environments using strong internal authentication methods like ldap, pam or shibboleth. You can allow users to change theyr username in these environments, but then new users (users loging in first time) is blocked from gitlab is her username exists.
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example1
-rw-r--r--config/initializers/1_settings.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 44154456430..62761c80cbb 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -35,6 +35,7 @@ production: &base
## Project settings
default_projects_limit: 10
# signup_enabled: true # default: false - Account passwords are not sent via the email if signup is enabled.
+ # username_changing_enabled: false # default: true - User can change her username/namespace
## Gravatar
gravatar:
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index b3fba99ebf3..f7d18e67148 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -57,6 +57,7 @@ Settings.gitlab['support_email'] ||= Settings.gitlab.email_from
Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
Settings.gitlab['user'] ||= 'git'
Settings.gitlab['signup_enabled'] ||= false
+Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil?
#
# Gravatar