Skip to content

Instantly share code, notes, and snippets.

@jdyke

jdyke/main.py Secret

Last active March 26, 2020 20:45
Show Gist options
  • Save jdyke/8179876b7a0deebefeb7a457e59beaca to your computer and use it in GitHub Desktop.
Save jdyke/8179876b7a0deebefeb7a457e59beaca to your computer and use it in GitHub Desktop.
## Check if member is still bound to resource
def check_member_on_resource(outside_member_ids, resource_bindings):
for bindings in resource_bindings:
for values in bindings.values():
for member in outside_member_ids:
if member in values:
try:
print(f"Member found: {member}")
return True
except:
logging.info("Did not find the anomalous member.")
continue
else:
logging.debug("Did not find the anomalous member.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment