Skip to content
Snippets Groups Projects
Commit a87647a7 authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

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!825TMSS-1160: allow filtering for usernames and email to limit the amount of info...
......@@ -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()
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment