diff options
-rw-r--r-- | gn3/case_attributes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/case_attributes.py b/gn3/case_attributes.py index 19d6c54..9182237 100644 --- a/gn3/case_attributes.py +++ b/gn3/case_attributes.py @@ -69,8 +69,8 @@ def required_access(inbredset_id: int, access_levels: tuple[str, ...]) -> bool: json={"resource-ids": [resource_id]}, headers={"Authorization": f"Bearer {the_token.access_token}"}) if auth.status_code == 200: - privs = (priv.privilege_id for role in auth.json()[resource_id]["roles"] - for priv in role) + privs = (priv["privilege_id"] for role in auth.json()[resource_id]["roles"] + for priv in role["privileges"]) authorisedp = all(lvl in privs for lvl in access_levels) if authorisedp: return authorisedp |