Commit 7c1c03888ceb9313dc08886438c9a50eb7f7e4c0
Exists in
spb-stable
and in
2 other branches
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce
Showing
4 changed files
with
6 additions
and
2 deletions
Show diff stats
app/helpers/application_helper.rb
| @@ -75,7 +75,7 @@ module ApplicationHelper | @@ -75,7 +75,7 @@ module ApplicationHelper | ||
| 75 | else | 75 | else |
| 76 | gravatar_url = request.ssl? || gitlab_config.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url | 76 | gravatar_url = request.ssl? || gitlab_config.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url |
| 77 | user_email.strip! | 77 | user_email.strip! |
| 78 | - sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size | 78 | + sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size, email: user_email |
| 79 | end | 79 | end |
| 80 | end | 80 | end |
| 81 | 81 |
config/gitlab.yml.example
| @@ -122,6 +122,7 @@ production: &base | @@ -122,6 +122,7 @@ production: &base | ||
| 122 | ## Gravatar | 122 | ## Gravatar |
| 123 | gravatar: | 123 | gravatar: |
| 124 | enabled: true # Use user avatar image from Gravatar.com (default: true) | 124 | enabled: true # Use user avatar image from Gravatar.com (default: true) |
| 125 | + # gravatar urls: possible placeholders: %{hash} %{size} %{email} | ||
| 125 | # plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm | 126 | # plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm |
| 126 | # ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm | 127 | # ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm |
| 127 | 128 |
config/initializers/devise.rb
| @@ -223,6 +223,7 @@ Devise.setup do |config| | @@ -223,6 +223,7 @@ Devise.setup do |config| | ||
| 223 | method: Gitlab.config.ldap['method'], | 223 | method: Gitlab.config.ldap['method'], |
| 224 | bind_dn: Gitlab.config.ldap['bind_dn'], | 224 | bind_dn: Gitlab.config.ldap['bind_dn'], |
| 225 | password: Gitlab.config.ldap['password'], | 225 | password: Gitlab.config.ldap['password'], |
| 226 | + filter: Gitlab.config.ldap['user_filter'], | ||
| 226 | name_proc: email_stripping_proc | 227 | name_proc: email_stripping_proc |
| 227 | end | 228 | end |
| 228 | 229 | ||
| @@ -244,4 +245,4 @@ Devise.setup do |config| | @@ -244,4 +245,4 @@ Devise.setup do |config| | ||
| 244 | 245 | ||
| 245 | config.omniauth provider['name'].to_sym, *provider_arguments | 246 | config.omniauth provider['name'].to_sym, *provider_arguments |
| 246 | end | 247 | end |
| 247 | -end | 248 | -end |
| 249 | +end | ||
| 248 | \ No newline at end of file | 250 | \ No newline at end of file |
doc/integration/omniauth.md
| @@ -21,6 +21,7 @@ Before configuring individual OmniAuth providers there are a few global settings | @@ -21,6 +21,7 @@ Before configuring individual OmniAuth providers there are a few global settings | ||
| 21 | ``` | 21 | ``` |
| 22 | 22 | ||
| 23 | 2. Find the section dealing with OmniAuth. The section will look similar to the following.<br /> | 23 | 2. Find the section dealing with OmniAuth. The section will look similar to the following.<br /> |
| 24 | + | ||
| 24 | ``` | 25 | ``` |
| 25 | ## OmniAuth settings | 26 | ## OmniAuth settings |
| 26 | omniauth: | 27 | omniauth: |
| @@ -50,6 +51,7 @@ Before configuring individual OmniAuth providers there are a few global settings | @@ -50,6 +51,7 @@ Before configuring individual OmniAuth providers there are a few global settings | ||
| 50 | # app_secret: 'YOUR APP SECRET', | 51 | # app_secret: 'YOUR APP SECRET', |
| 51 | # args: { scope: 'user:email' } } | 52 | # args: { scope: 'user:email' } } |
| 52 | ``` | 53 | ``` |
| 54 | + | ||
| 53 | 3. Change `enabled` to `true`. | 55 | 3. Change `enabled` to `true`. |
| 54 | 4. Consider the next two configuration options: `allow_single_sign_on` and `block_auto_created_users`. | 56 | 4. Consider the next two configuration options: `allow_single_sign_on` and `block_auto_created_users`. |
| 55 | * `allow_single_sign_on` defaults to `false`. If `false` users must be created manually or they will not be able to | 57 | * `allow_single_sign_on` defaults to `false`. If `false` users must be created manually or they will not be able to |