Skip to content

Commit

Permalink
Skip grant_from_storage on passport login
Browse files Browse the repository at this point in the history
  • Loading branch information
k-burt-uch committed Jan 24, 2025
1 parent fb3bab1 commit d53e830
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions fence/sync/sync_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,19 +1000,19 @@ def sync_to_storage_backend(
# when updating users we want to maintain case sensitivity in the username so
# pass the original, non-lowered user_info dict
self._upsert_userinfo(sess, {user_info["username"].lower(): user_info})
if not skip_google_updates:
self._grant_from_storage(
to_add,
user_project_lowercase,
sess,
google_bulk_mapping=google_group_user_mapping,
expires=expires,
)

self._grant_from_storage(
to_add,
user_project_lowercase,
sess,
google_bulk_mapping=google_group_user_mapping,
expires=expires,
)

if config["GOOGLE_BULK_UPDATES"] and not skip_google_updates:
self.logger.info("Updating user's google groups ...")
update_google_groups_for_users(google_group_user_mapping)
self.logger.info("Google groups update done!!")
if config["GOOGLE_BULK_UPDATES"]:
self.logger.info("Updating user's google groups ...")
update_google_groups_for_users(google_group_user_mapping)
self.logger.info("Google groups update done!!")

sess.commit()

Expand Down

0 comments on commit d53e830

Please sign in to comment.