Skip to content

Commit

Permalink
remove extra log print
Browse files Browse the repository at this point in the history
  • Loading branch information
MaribelleHGomez committed Aug 16, 2021
1 parent 70267c3 commit e3a2a13
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions fence/sync/sync_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,10 @@ def from_file(cls, filepath, encrypted=True, key=None, logger=None):
"""
data = {}
if filepath:
logger.info("FILE PATH: {}".format(filepath))
with _read_file(filepath, encrypted=encrypted, key=key, logger=logger) as f:
file_contents = f.read()
validate_user_yaml(file_contents) # run user.yaml validation tests
data = yaml.safe_load(file_contents)
logger.info("FILE DATA: {}".format(data))
else:
if logger:
logger.info("Did not sync a user.yaml, no file path provided.")
Expand Down Expand Up @@ -1577,14 +1575,12 @@ def _update_arborist(self, session, user_yaml):
# First recreate these groups in order to clear out old, possibly deleted policies
for builtin_group in ["anonymous", "logged-in"]:
try:
self.logger.info("BUILT IN GROUP: {}".format(str(builtin_group)))
response = self.arborist_client.put_group(builtin_group)
except ArboristError as e:
self.logger.info("couldn't put group: {}".format(str(e)))

# Now add back policies that are in the user.yaml
for policy in user_yaml.authz.get("anonymous_policies", []):
self.logger.info("anon policy: {}".format(str(policy)))
self.arborist_client.grant_group_policy("anonymous", policy)

for policy in user_yaml.authz.get("all_users_policies", []):
Expand Down

0 comments on commit e3a2a13

Please sign in to comment.