diff options
author | Frederick Muriuki Muriithi | 2023-10-12 02:20:33 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-10-12 02:20:33 +0300 |
commit | 3094afcbf3cc39e19498d8207401db6dafc2ecbd (patch) | |
tree | f936bdb84ad71b5567f49afd8a0c08408aadbd33 /gn3 | |
parent | 5573a4eabbd7bbdb55cb20f20f716279d9616f29 (diff) | |
download | genenetwork3-3094afcbf3cc39e19498d8207401db6dafc2ecbd.tar.gz |
CaseAttribute: Bug: enumerate the privileges correctly.
Diffstat (limited to 'gn3')
-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 |