Skip to content

Commit

Permalink
Log user's email with their google proxy groups
Browse files Browse the repository at this point in the history
  • Loading branch information
k-burt-uch committed Feb 19, 2025
1 parent 7dcce30 commit 1e868bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fence/resources/google/access_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def update_google_groups_for_users(google_single_user_mapping):
google_update_failures = True
user_current_groups = []

logger.info(f"User's current groups: {user_current_groups}")
logger.info(f"User {user_email}'s current groups: {user_current_groups}")

# Determine which groups to add the user to and which to remove them from
current_groups = set(user_current_groups)
Expand Down Expand Up @@ -107,14 +107,17 @@ def update_google_groups_for_users(google_single_user_mapping):
f"FAILED TO UPDATE GOOGLE GROUPS FOR USER {user_email} (see previous errors)."
)


@backoff.on_exception(backoff.expo, Exception, **DEFAULT_BACKOFF_SETTINGS)
def _get_members_from_google_group(gcm, group):
return gcm.get_group_members(group)


@backoff.on_exception(backoff.expo, Exception, **DEFAULT_BACKOFF_SETTINGS)
def _get_groups_for_user(gcm, user):
return gcm.get_groups_for_user(user)


@backoff.on_exception(backoff.expo, Exception, **DEFAULT_BACKOFF_SETTINGS)
def _add_member_to_google_group(gcm, add_member_to_group, group):
gcm.add_member_to_group(add_member_to_group, group)
Expand Down

0 comments on commit 1e868bd

Please sign in to comment.