-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: remove access_type from curation API #3080
Conversation
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.
We're now running into the problem with my design choice from a while back for the reshape method 😅
See comment about breaking Super Curator #3
# Conflicts: # backend/config/curation-api.yml # tests/unit/backend/corpora/api_server/curator/collection/test_curation_collections.py
else: | ||
result = owner_or_allowed(token_info) | ||
if result: | ||
filters.append(DbCollection.owner == result) |
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.
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.
nvm, owner_or_allowed already returns None for superusers. Maybe could use a rename, but that's out of scope for this ticket
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.
I'll leave this open as a non-blocking suggestion in case you do think of a better name, because it isn't clear just reading a call to owner_or_allowed what it actually returns. but admittedly, I can't come up with anything particularly great off the top of my head
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.
I change the name to owner_filter and added a comment.
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.
The change itself looks good! I left a few non-blocking suggestions for readability / code clean-up, but I recognize those issues didn't originate with this fix. We can also revisit later, or you can let me know if you disagree
* fix: remove self example from openapi (#3173) * chore: cherry pick changes from #3172 surface dataset batch_condition in curation API (#3177) * feat: surface dataset batch_condition in curation API * resolve merge conflict * fix: document upload links that are suported (#3176) * Document the types of links that are supported * Update documentation * docs: Renaming scExpression to Gene Expression (#3091) * docs: Renaming scExpression to Gene Expression - changing route to gene-expression instead of scExpression * chore(fe): upgrade to nextjs12 blueprint4 node16 (#3119) * chore(fe): upgrade to nextjs12 blueprint4 node16 * upgrade packages to resolve vulns * fix(lint): lint stuff * fix(lint): lint stuff * restore css usage * update Dockerfile * clean up css * fix bp4 css change * update docsite image css * fix: remove access_type from curation API (#3080) * remove access_type form curation API * remove is_allowed check from reshape_for_curation_api * update openapi * Fix the error message when curator is used by not a super curator * fix errors * Move all reshaping collection code into reshape_for_curation_api. * fix: change the datasets response shape (#3178) change name to title in dataset change is_primary_data to list of boolean in dataset * fix(curation api):Remove h5ad suffix requirements (#3151) - remove .h5ad suffix from uploads and curator tags - check for embedded UUID in curator tag * fix: backend/Makefile local db improvements, migration README (#3029) * fix: backend/Makefile local db improvements, migration README - Rename the targets for loading data and loading schema into local test db - Adapt the commands for the above two scripts to actually work (??) * doc updates * additional doc update * style: remove unused regex and consolidate curator tag logic (#3200) Co-authored-by: Trent Smith <1429913+Bento007@users.noreply.github.com> Co-authored-by: Nayib Gloria <55710092+nayib-jose-gloria@users.noreply.github.com> Co-authored-by: ashin-czi <109984998+ashin-czi@users.noreply.github.com> Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>
* fix: remove self example from openapi (#3173) * chore: cherry pick changes from #3172 surface dataset batch_condition in curation API (#3177) * feat: surface dataset batch_condition in curation API * resolve merge conflict * fix: document upload links that are suported (#3176) * Document the types of links that are supported * Update documentation * docs: Renaming scExpression to Gene Expression (#3091) * docs: Renaming scExpression to Gene Expression - changing route to gene-expression instead of scExpression * chore(fe): upgrade to nextjs12 blueprint4 node16 (#3119) * chore(fe): upgrade to nextjs12 blueprint4 node16 * upgrade packages to resolve vulns * fix(lint): lint stuff * fix(lint): lint stuff * restore css usage * update Dockerfile * clean up css * fix bp4 css change * update docsite image css * fix: remove access_type from curation API (#3080) * remove access_type form curation API * remove is_allowed check from reshape_for_curation_api * update openapi * Fix the error message when curator is used by not a super curator * fix errors * Move all reshaping collection code into reshape_for_curation_api. * fix: change the datasets response shape (#3178) change name to title in dataset change is_primary_data to list of boolean in dataset * fix(curation api):Remove h5ad suffix requirements (#3151) - remove .h5ad suffix from uploads and curator tags - check for embedded UUID in curator tag * fix: backend/Makefile local db improvements, migration README (#3029) * fix: backend/Makefile local db improvements, migration README - Rename the targets for loading data and loading schema into local test db - Adapt the commands for the above two scripts to actually work (??) * doc updates * additional doc update * style: remove unused regex and consolidate curator tag logic (#3200) Co-authored-by: Trent Smith <1429913+Bento007@users.noreply.github.com> Co-authored-by: Nayib Gloria <55710092+nayib-jose-gloria@users.noreply.github.com> Co-authored-by: ashin-czi <109984998+ashin-czi@users.noreply.github.com> Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com> Co-authored-by: Trent Smith <1429913+Bento007@users.noreply.github.com> Co-authored-by: Nayib Gloria <55710092+nayib-jose-gloria@users.noreply.github.com> Co-authored-by: ashin-czi <109984998+ashin-czi@users.noreply.github.com> Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>
access_type
in responses #2997GET /collections
index endpoint #2793Reviewers
Functional: @danieljhegeman
Readability: @ebezzi
Changes
QA steps (optional)
Notes for Reviewer
blocked by #3089