Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Discourse SAML
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
Giacomo Vercesi
Discourse SAML
Commits
f42577cb
Commit
f42577cb
authored
3 years ago
by
David Taylor
Browse files
Options
Downloads
Patches
Plain Diff
UX: If configured via environment variables, hide the site settings
parent
e9f9150b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugin.rb
+9
-0
9 additions, 0 deletions
plugin.rb
with
9 additions
and
0 deletions
plugin.rb
+
9
−
0
View file @
f42577cb
...
...
@@ -52,6 +52,15 @@ module ::DiscourseSaml
end
after_initialize
do
if
!!
GlobalSetting
.
try
(
"
#{
name
}
_target_url"
)
# Configured via environment variables. Hide all the site settings
# from the UI to avoid confusion
SiteSetting
.
defaults
.
all
.
keys
.
each
do
|
k
|
next
if
!
k
.
to_s
.
start_with?
(
"saml_"
)
SiteSetting
.
hidden_settings
<<
k
end
end
# "SAML Forced Domains" - Prevent login via email
on
(
:before_email_login
)
do
|
user
|
if
::
DiscourseSaml
.
is_saml_forced_domain?
(
user
.
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