-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PXP-1089 add test + fix acl/authz/size query #251
Conversation
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a question about possible alternative!
Other than that:
- do we have any particular reason for assuming that
?x=y,z
means AND instead of OR? - do we want the same behavior for urls?
indexd/index/drivers/alchemy.py
Outdated
if acl: | ||
query = query.join(IndexRecord.acl) | ||
sub = session.query(IndexRecordACE.did) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we lose anything by doing this instead?
if acl:
for u in acl:
sub = session.query(IndexRecordACE.did).filter(IndexRecordACE.ace == u)
query = query.filter(IndexRecord.did.in_(sub.subquery()))
indexd/index/drivers/alchemy.py
Outdated
if authz: | ||
query = query.join(IndexRecord.authz) | ||
sub = session.query(IndexRecordAuthz.did) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as with acl
if users want OR they can query each item separately; this is the only way to query AND
mm, i guess 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 if you are bored you can specify in the swagger that the multiple urls etc will be anded 🌮
Bug Fixes
Improvements