Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4b584643
Commit
4b584643
authored
Apr 30, 2018
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude Group SAML from sign in buttons
Also excludes Group SAML from OmniauthCallbacksController methods
parent
e8fbf7aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
ee/app/helpers/ee/auth_helper.rb
ee/app/helpers/ee/auth_helper.rb
+12
-0
ee/changelogs/unreleased/jej-exclude-group-saml-buttons.yml
ee/changelogs/unreleased/jej-exclude-group-saml-buttons.yml
+5
-0
spec/helpers/auth_helper_spec.rb
spec/helpers/auth_helper_spec.rb
+10
-0
No files found.
ee/app/helpers/ee/auth_helper.rb
View file @
4b584643
...
...
@@ -2,6 +2,18 @@ module EE
module
AuthHelper
extend
::
Gitlab
::
Utils
::
Override
GROUP_LEVEL_PROVIDERS
=
%i(group_saml)
.
freeze
override
:button_based_providers
def
button_based_providers
super
-
GROUP_LEVEL_PROVIDERS
end
override
:providers_for_base_controller
def
providers_for_base_controller
super
-
GROUP_LEVEL_PROVIDERS
end
override
:form_based_provider?
def
form_based_provider?
(
name
)
super
||
name
.
to_s
==
'kerberos'
...
...
ee/changelogs/unreleased/jej-exclude-group-saml-buttons.yml
0 → 100644
View file @
4b584643
---
title
:
Exclude GroupSAML from sign in buttons
merge_request
:
5449
author
:
type
:
fixed
spec/helpers/auth_helper_spec.rb
View file @
4b584643
...
...
@@ -12,6 +12,11 @@ describe AuthHelper do
expect
(
helper
.
button_based_providers
).
to
include
(
:twitter
)
end
it
'excludes group_saml'
do
allow
(
helper
).
to
receive
(
:auth_providers
)
{
[
:group_saml
]
}
expect
(
helper
.
button_based_providers
).
to
eq
([])
end
it
'returns empty array'
do
allow
(
helper
).
to
receive
(
:auth_providers
)
{
[]
}
expect
(
helper
.
button_based_providers
).
to
eq
([])
...
...
@@ -28,6 +33,11 @@ describe AuthHelper do
allow
(
helper
).
to
receive
(
:auth_providers
)
{
[
:twitter
,
:ldapmain
]
}
expect
(
helper
.
providers_for_base_controller
).
not_to
include
(
:ldapmain
)
end
it
'excludes group_saml'
do
allow
(
helper
).
to
receive
(
:auth_providers
)
{
[
:group_saml
]
}
expect
(
helper
.
providers_for_base_controller
).
to
eq
([])
end
end
describe
"form_based_providers"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment