Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-04-07 02:12:25 +0300
committerPatricio Cano <suprnova32@gmail.com>2016-04-07 02:12:25 +0300
commit8110e7530902de8744ff985f08938306e2c38367 (patch)
treebb0d7ee98b40059d51c895ec6d2e5eb6ee35a635 /lib/gitlab/saml
parenteb0f1de36c6ebf13d86540bb79d7fb07fc3642f0 (diff)
Implemented suggested fixes
Diffstat (limited to 'lib/gitlab/saml')
-rw-r--r--lib/gitlab/saml/auth_hash.rb2
-rw-r--r--lib/gitlab/saml/config.rb1
-rw-r--r--lib/gitlab/saml/user.rb7
3 files changed, 4 insertions, 6 deletions
diff --git a/lib/gitlab/saml/auth_hash.rb b/lib/gitlab/saml/auth_hash.rb
index 3414d24ca73..32c1c9ec5bb 100644
--- a/lib/gitlab/saml/auth_hash.rb
+++ b/lib/gitlab/saml/auth_hash.rb
@@ -9,7 +9,7 @@ module Gitlab
private
def get_raw(key)
- # Needs to call `all` because of https://github.com/onelogin/ruby-saml/blob/master/lib/onelogin/ruby-saml/attributes.rb#L78
+ # Needs to call `all` because of https://git.io/vVo4u
# otherwise just the first value is returned
auth_hash.extra[:raw_info].all[key]
end
diff --git a/lib/gitlab/saml/config.rb b/lib/gitlab/saml/config.rb
index 2b3cf840f61..0f40c00f547 100644
--- a/lib/gitlab/saml/config.rb
+++ b/lib/gitlab/saml/config.rb
@@ -1,4 +1,3 @@
-# Load a specific server configuration
module Gitlab
module Saml
class Config
diff --git a/lib/gitlab/saml/user.rb b/lib/gitlab/saml/user.rb
index 73fc443a02b..c1072452abe 100644
--- a/lib/gitlab/saml/user.rb
+++ b/lib/gitlab/saml/user.rb
@@ -28,12 +28,11 @@ module Gitlab
if external_users_enabled?
# Check if there is overlap between the user's groups and the external groups
- # setting and set user as external or internal.
+ # setting then set user as external or internal.
if (auth_hash.groups & Gitlab::Saml::Config.external_groups).empty?
- # Avoid an unnecessary change of values and the subsequent save
- @user.external = false if @user.external
+ @user.external = false
else
- @user.external = true unless @user.external
+ @user.external = true
end
end