Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
a87647a7
Commit
a87647a7
authored
2 years ago
by
Jörn Künsemöller
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-1160
: use email filter in get_name_by_role_in_project
parent
ea0a90ba
No related branches found
No related tags found
1 merge request
!825
TMSS-1160: allow filtering for usernames and email to limit the amount of info...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SAS/TMSS/backend/src/tmss/authentication_backends.py
+2
-2
2 additions, 2 deletions
SAS/TMSS/backend/src/tmss/authentication_backends.py
SAS/TMSS/backend/src/tmss/tmssapp/adapters/keycloak.py
+1
-1
1 addition, 1 deletion
SAS/TMSS/backend/src/tmss/tmssapp/adapters/keycloak.py
with
3 additions
and
3 deletions
SAS/TMSS/backend/src/tmss/authentication_backends.py
+
2
−
2
View file @
a87647a7
...
...
@@ -32,7 +32,7 @@ class TMSSOIDCAuthenticationBackend(OIDCAuthenticationBackend):
except
Exception
as
e
:
logger
.
error
(
'
could not handle entitlement=%s because of exception=%s
'
%
(
entitlement
,
e
))
user
.
project_roles
=
project_roles
logger
.
info
(
"
### assigned project_roles=%s to user=%s
"
%
(
project_roles
,
user
))
logger
.
info
(
"
### assigned project_roles=%s to user=%s
"
%
(
project_roles
,
user
))
# todo: review GDPR
user
.
save
()
def
_set_user_system_roles_from_claims
(
self
,
user
,
claims
):
...
...
@@ -55,7 +55,7 @@ class TMSSOIDCAuthenticationBackend(OIDCAuthenticationBackend):
logger
.
error
(
'
could not handle entitlement=%s because no system role / group exists that matches the entitlement role=%s
'
%
(
entitlement
,
role_name
))
except
Exception
as
e
:
logger
.
error
(
'
could not handle entitlement=%s because of exception=%s
'
%
(
entitlement
,
e
))
logger
.
info
(
"
assigned groups=%s to user=%s
"
%
(
groups
,
user
))
logger
.
info
(
"
###
assigned groups=%s to user=%s
"
%
(
groups
,
user
))
# todo: review GDPR
user
.
groups
.
set
(
groups
)
user
.
save
()
...
...
This diff is collapsed.
Click to expand it.
SAS/TMSS/backend/src/tmss/tmssapp/adapters/keycloak.py
+
1
−
1
View file @
a87647a7
...
...
@@ -143,7 +143,7 @@ def get_user_mapping(include_usernames: tuple = None, include_email: tuple = Non
def
get_email_to_name_mapping
(
include_email
:
tuple
=
None
):
# first create a reverse map of unique-email to multiple-usernames-for-the-same-person
reverse_users_map
=
{}
for
name
,
email
in
get_user_mapping
(
include_email
).
items
():
for
name
,
email
in
get_user_mapping
(
include_email
=
include_email
).
items
():
if
email
not
in
reverse_users_map
:
reverse_users_map
[
email
]
=
[]
reverse_users_map
[
email
].
append
(
name
)
...
...
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