Skip to content

Instantly share code, notes, and snippets.

@matburt
Forked from j00bar/rbac.py
Last active March 8, 2016 20:50
Show Gist options
  • Save matburt/ed96196e0e8f1bdf6855 to your computer and use it in GitHub Desktop.
Save matburt/ed96196e0e8f1bdf6855 to your computer and use it in GitHub Desktop.
if is_used_by_job_template(cred):
if is_used_by_multiple_jts(cred):
duplicate_creds()
convert_cred_to_org_cred(cred)
else:
convert_cred_to_org_cred(cred)
elif cred.team:
convert_cred_to_org_cred(cred)
give_team_role_on_cred(cred, cred.team)
elif cred.user:
convert_cred_to_user_cred(cred)
else:
orphan_and_log(cred)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment