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
f6875416
Commit
f6875416
authored
Feb 19, 2019
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GroupSAML metadata feature flag
parent
7713cb08
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
ee/lib/gitlab/auth/group_saml/group_lookup.rb
ee/lib/gitlab/auth/group_saml/group_lookup.rb
+1
-1
ee/lib/omni_auth/strategies/group_saml.rb
ee/lib/omni_auth/strategies/group_saml.rb
+1
-1
ee/spec/lib/omni_auth/strategies/group_saml_spec.rb
ee/spec/lib/omni_auth/strategies/group_saml_spec.rb
+9
-0
No files found.
ee/lib/gitlab/auth/group_saml/group_lookup.rb
View file @
f6875416
...
...
@@ -13,7 +13,7 @@ module Gitlab
end
def
group
Group
.
find_by_full_path
(
path
)
@group
||=
Group
.
find_by_full_path
(
path
)
end
def
saml_provider
...
...
ee/lib/omni_auth/strategies/group_saml.rb
View file @
f6875416
...
...
@@ -51,7 +51,7 @@ module OmniAuth
end
def
metadata_enabled?
Feature
.
enabled?
(
:group_saml_metadata_available
)
Feature
.
enabled?
(
:group_saml_metadata_available
,
group_lookup
.
group
)
end
def
group_lookup
...
...
ee/spec/lib/omni_auth/strategies/group_saml_spec.rb
View file @
f6875416
...
...
@@ -133,6 +133,15 @@ describe OmniAuth::Strategies::GroupSaml, type: :strategy do
expect
(
last_response
.
status
).
to
eq
404
end
it
'suceeds when feature enabled for an individual group'
do
stub_feature_flags
(
group_saml_metadata_available:
false
)
allow
(
Feature
).
to
receive
(
:enabled?
).
with
(
:group_saml_metadata_available
,
group
)
{
true
}
post
'/users/auth/group_saml/metadata'
,
group_path:
'my-group'
,
token:
group
.
saml_discovery_token
expect
(
last_response
.
status
).
to
eq
200
end
it
'returns metadata when a valid token is provided'
do
post
'/users/auth/group_saml/metadata'
,
group_path:
'my-group'
,
token:
group
.
saml_discovery_token
...
...
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