-
Notifications
You must be signed in to change notification settings - Fork 4
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
Data Manager #518
Data Manager #518
Conversation
Add owner_id column to datasets
add permissions docs
Write owner_id on new dataset creation
…_protect_dataset_endpoints
Pass user details when authenticating instead of a bool, check for manager on dataset creation
GTC-2794: Only owner or admin can use mutate dataset endpoints
Make use of get_owner in the asset operations. The checks for the pure asset operations were slightly trickier than dataset/version operations, because the dataset name is available in the URL path. You need to do a DB operation to get the dataset name. So, I put the actual get_owner() call in the main function rather than in a Depends() argument. I didn't try to add a new Depends() function that magically does the DB operation, since some of the functions already do the DB operation for other reasons. Updated the test for update_metadata and update_field_metadata to test success and failure cases for different users. Added a missing check for the ADMIN role in get_owner() and updated its comment. Updated the detail of the various permission exceptions to be more informative (GTC-2795). Let me know what you think. We could put a bit more information in these messages if we did these errors in the main functions, rather than in the Depends functions, but that is probably not worth it. In test_dataset.py, several tests were being skipped unintentionally because they were missing the '@pytyest.mark.asyncio' annotation, so I added that in where needed.
Check for owner on version updates
fix data manager logic
Feature/data manager user fix
point to production rw api - needed for interacting with users
GTC-2822 Check for dataset ownership on asset requests
Allow reassigning data owner.
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.
Looks good. You're not quite caught up with 'develop', so you might want to merge develop over one more time, and run the tests again. Or just check in and see that the tests run fine on develop.
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #518 +/- ##
===========================================
- Coverage 81.79% 81.69% -0.11%
===========================================
Files 124 125 +1
Lines 5538 5610 +72
===========================================
+ Hits 4530 4583 +53
- Misses 1008 1027 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pull request checklist
Please check if your PR fulfills the following requirements:
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Only admins with "gfw" app can manage datasets.
Issue Number: GTC-2791
What is the new behavior?
Does this introduce a breaking change?
Other information