Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jhub_remote_user_authenticator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RWTHjupyter
Upstream
jhub_remote_user_authenticator
Commits
af74a911
Commit
af74a911
authored
2 years ago
by
Steffen Vogel
Browse files
Options
Downloads
Patches
Plain Diff
move update_affiliation to post_auth_hook
parent
2ea555b2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jhub_remote_user_authenticator/remote_user_auth.py
+0
-20
0 additions, 20 deletions
jhub_remote_user_authenticator/remote_user_auth.py
with
0 additions
and
20 deletions
jhub_remote_user_authenticator/remote_user_auth.py
+
0
−
20
View file @
af74a911
...
...
@@ -48,28 +48,8 @@ class RemoteUserLoginHandler(BaseHandler):
if
len
(
auth_state
)
>
0
:
await
user
.
save_auth_state
(
auth_state
)
self
.
update_affiliation
(
user
.
orm_user
)
self
.
statsd
.
incr
(
'
login.request
'
)
def
update_affiliation
(
self
,
user
):
affiliations
=
self
.
request
.
headers
.
get
(
'
Edupersonscopedaffiliation
'
)
affiliations
=
affiliations
.
split
(
'
;
'
)
for
affiliation
in
affiliations
:
match
=
re
.
search
(
r
'
(member|student|employee)@rwth-aachen.de
'
,
affiliation
)
if
match
is
not
None
:
affiliation_group
=
match
.
group
(
1
)
group
=
orm
.
Group
.
find
(
self
.
db
,
name
=
affiliation_group
)
if
group
is
None
:
continue
if
user
not
in
group
.
users
:
group
.
users
.
append
(
user
)
self
.
db
.
commit
()
def
welcome_page
(
self
):
"""
Present welcome page with login button
"""
...
...
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