Skip to content
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

5716 edit file api perms #6847

Merged
merged 15 commits into from
Apr 23, 2020
Merged

5716 edit file api perms #6847

merged 15 commits into from
Apr 23, 2020

Conversation

sekmiller
Copy link
Contributor

What this PR does / why we need it:
This PR restricts the use of the import dataset and create dataset (with files) to accounts with superuser permissions. This is needed to strictly limit the instances in which file metadata/datafile records are created in the absence of a physical file.

Which issue(s) this PR closes:

Closes #5716

Special notes for your reviewer:

Suggestions on how to test this:
verify that a non-super user may still use the create dataset api as long as files are not included.

Does this PR introduce a user interface change?:
No
Is there a release notes update needed for this change?:

Additional documentation:

@coveralls
Copy link

coveralls commented Apr 21, 2020

Coverage Status

Coverage decreased (-0.0005%) to 19.629% when pulling d64e8ce on 5716-edit-file-api-perms into 68bb656 on develop.

@landreev landreev self-requested a review April 22, 2020 13:13
@scolapasta scolapasta self-assigned this Apr 22, 2020
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from Code Review 🦁 to QA 🔎✅ Apr 22, 2020
Copy link
Contributor

@landreev landreev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'm impressed that you added that whole dedicated test to api/DatasetsIT, just to get a BAD_REQUEST in the end... I mean, it makes sense, but still.

@sekmiller
Copy link
Contributor Author

@landreev I thought there was going to be more to it than that, but after writing the test I realized that the update version has never been used to add files so I left it at that.

@landreev
Copy link
Contributor

I thought there was going to be more to it than that, but after writing the test I realized that the update version has never been used to add files so I left it at that.

Makes sense. And it's still a useful test.

@scolapasta scolapasta removed their assignment Apr 23, 2020
@kcondon kcondon self-assigned this Apr 23, 2020
@kcondon kcondon merged commit e962cdd into develop Apr 23, 2020
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA 🔎✅ to Done 🚀 Apr 23, 2020
@kcondon kcondon deleted the 5716-edit-file-api-perms branch April 23, 2020 17:21
@djbrooke djbrooke added this to the Dataverse 5 milestone Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Update DataFile creation/editing API permissions to superusers only
6 participants