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
3c02a24c
Commit
3c02a24c
authored
Oct 31, 2018
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use TokenAuthenticatable for saml_discovery_token
parent
9e8d2dfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
ee/app/models/ee/group.rb
ee/app/models/ee/group.rb
+5
-6
No files found.
ee/app/models/ee/group.rb
View file @
3c02a24c
...
@@ -8,6 +8,10 @@ module EE
...
@@ -8,6 +8,10 @@ module EE
extend
::
Gitlab
::
Utils
::
Override
extend
::
Gitlab
::
Utils
::
Override
prepended
do
prepended
do
include
TokenAuthenticatable
add_authentication_token_field
:saml_discovery_token
,
unique:
false
,
token_generator:
->
{
Devise
.
friendly_token
(
8
)
}
has_many
:epics
has_many
:epics
has_one
:saml_provider
has_one
:saml_provider
...
@@ -115,12 +119,7 @@ module EE
...
@@ -115,12 +119,7 @@ module EE
# This token conveys that the anonymous user is allowed to know of the group
# This token conveys that the anonymous user is allowed to know of the group
# Used to avoid revealing that a group exists on a given path
# Used to avoid revealing that a group exists on a given path
def
saml_discovery_token
def
saml_discovery_token
super
.
presence
||
begin
ensure_saml_discovery_token!
self
.
saml_discovery_token
=
Devise
.
friendly_token
(
8
)
save
if
::
Gitlab
::
Database
.
read_write?
super
end
end
end
def
project_creation_level
def
project_creation_level
...
...
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