Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Privacy
Imprint
Contact
Login methods
Sign in
Toggle navigation
Menu
Open sidebar
projects.thm.de
GitLab
Commits
8e31338a
Commit
8e31338a
authored
Apr 14, 2015
by
Daniel Gerhardt
Browse files
Add CAS specifc methods to user model
parent
65642c0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/user.rb
View file @
8e31338a
...
...
@@ -616,6 +616,14 @@ def ldap_identity
@ldap_identity
||=
identities
.
find_by
([
"provider LIKE ?"
,
"ldap%"
])
end
def
cas_user?
identities
.
exists?
([
"provider = ? AND extern_uid IS NOT NULL"
,
"cas3"
])
end
def
cas_identity
@cas_identity
||=
identities
.
find_by
([
"provider = ?"
,
"cas3"
])
end
def
project_deploy_keys
DeployKey
.
unscoped
.
in_projects
(
self
.
authorized_projects
.
pluck
(
:id
)).
distinct
(
:id
)
end
...
...
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