Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
4f73f6fa
Unverified
Commit
4f73f6fa
authored
2 years ago
by
Sébastien Gaya
Browse files
Options
Downloads
Patches
Plain Diff
oops
parent
616a3c64
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/models/communication/extranet/with_sso.rb
+22
-0
22 additions, 0 deletions
app/models/communication/extranet/with_sso.rb
app/models/university/with_sso.rb
+0
-20
0 additions, 20 deletions
app/models/university/with_sso.rb
with
22 additions
and
20 deletions
app/models/communication/extranet/with_sso.rb
+
22
−
0
View file @
4f73f6fa
...
...
@@ -18,6 +18,28 @@ module Communication::Extranet::WithSso
super
(
value
)
end
def
sso_cert
sso_inherit_from_university?
?
university
.
sso_cert
:
@sso_cert
end
def
sso_mapping
sso_inherit_from_university?
?
university
.
sso_mapping
:
@sso_mapping
end
def
sso_name_identifier_format
sso_inherit_from_university?
?
university
.
sso_name_identifier_format
:
@sso_name_identifier_format
end
def
sso_provider
sso_inherit_from_university?
?
university
.
sso_provider
:
@sso_provider
end
def
sso_target_url
sso_inherit_from_university?
?
university
.
sso_target_url
:
@sso_target_url
end
private
def
sso_mapping_should_have_email
errors
.
add
(
:sso_mapping
,
:missing_email
)
unless
(
sso_mapping
||
[]).
detect
{
|
sso_item
|
sso_item
[
'internal_key'
]
==
'email'
}
end
...
...
This diff is collapsed.
Click to expand it.
app/models/university/with_sso.rb
+
0
−
20
View file @
4f73f6fa
...
...
@@ -18,26 +18,6 @@ module University::WithSso
super
(
value
)
end
def
sso_cert
sso_inherit_from_university?
?
university
.
sso_cert
:
@sso_cert
end
def
sso_mapping
sso_inherit_from_university?
?
university
.
sso_mapping
:
@sso_mapping
end
def
sso_name_identifier_format
sso_inherit_from_university?
?
university
.
sso_name_identifier_format
:
@sso_name_identifier_format
end
def
sso_provider
sso_inherit_from_university?
?
university
.
sso_provider
:
@sso_provider
end
def
sso_target_url
sso_inherit_from_university?
?
university
.
sso_target_url
:
@sso_target_url
end
private
def
sso_mapping_should_have_email
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment