diff options
author | Jeff Bradberry <jeff.bradberry@gmail.com> | 2024-05-03 21:11:33 +0200 |
---|---|---|
committer | Jeff Bradberry <jeff.bradberry@gmail.com> | 2024-06-10 22:36:22 +0200 |
commit | 85fc81aab1627715bb3ffa3b1814581083ea8242 (patch) | |
tree | bcfe317a9b3f214cd3af3418210bb415173e61fe /tools | |
parent | Treat resources with null role fks differently (diff) | |
download | awx-85fc81aab1627715bb3ffa3b1814581083ea8242.tar.xz awx-85fc81aab1627715bb3ffa3b1814581083ea8242.zip |
Start a new script that can be used to examine a Role's ancestry
Diffstat (limited to 'tools')
-rw-r--r-- | tools/scripts/ig-hotfix/role_chain.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/scripts/ig-hotfix/role_chain.py b/tools/scripts/ig-hotfix/role_chain.py new file mode 100644 index 0000000000..4b8b7b6918 --- /dev/null +++ b/tools/scripts/ig-hotfix/role_chain.py @@ -0,0 +1,14 @@ +from collections import defaultdict +import os +import sys + +from django.contrib.contenttypes.models import ContentType + +from awx.main.fields import ImplicitRoleField +from awx.main.models.rbac import Role + + +r_id = int(os.environ.get('role')) +r = Role.objects.get(id=r_id) + +print(r) |