Skip to content

Comments

only render edit files when hasValidTermsOfAccess #8742#8863

Merged
kcondon merged 2 commits intodevelopfrom
8742-valid-toa
Aug 3, 2022
Merged

only render edit files when hasValidTermsOfAccess #8742#8863
kcondon merged 2 commits intodevelopfrom
8742-valid-toa

Conversation

@pdurbin
Copy link
Member

@pdurbin pdurbin commented Jul 27, 2022

What this PR does / why we need it:

One gets very strange behavior when the yellow "Info – Datasets with restricted files are required to have Request Access enabled or Terms of Access to help people access the data. Please edit the dataset to confirm Request Access or provide Terms of Access to be in compliance with the policy" message is present at the top of the dataset page.

The kebabs in the file listing on the dataset page are missing the dropdown and are non-functional.

This pull request removes the kebabs to be more in line with what we do on the file landing page. That is, now in both cases we prevent files from being edited until the dataset is in compliance. To get the dataset in compliance, you follow the instructions in the yellow info message.

Which issue(s) this PR closes:

Special notes for your reviewer:

At standup we said we'd like the dataset page to be like the file page in that we don't users editing files when the dataset is out of compliance. That's fine but the file page was only disabling the "Edit File" dropdown in CSS. It's easy to enable the button again using browser tools. So, for both the file page and the dataset page this pull request renders out the "edit file" option. More secure that way.

Suggestions on how to test this:

  • create a dataset
  • upload at least two files
  • restrict one of the files (accept the defaults, which is "allow access request" check and nothing written in terms.
  • publish
  • Set fileaccessrequest to false. I only have one dataset so I ran update termsofuseandaccess set fileaccessrequest = false;
  • As a sanity check, run scripts/issues/8191/datasets_without_toa_or_request_access from the 5.11 release notes to see that this is now a dataset that's out of compliance. It has no terms and it doesn't allow access requests.
  • Refresh the dataset page. You should see the strange kebab with no dropdown (screenshot below).
  • Try clicking the strange kebab on either file (the restricted one or the non-restricted one). The "This file has already been deleted..." message will appear the moment you click the kebab (screenshot below). Basically, no operations are allowed, not just restrict. Note also that the "Edit Files" button is disabled.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Yes, if the dataset is out of compliance with the terms policy:

  • the kebabs on the file listing page are now absent (these allow editing)
  • the "Edit File" dropdown on the file page are absent (previously it was disabled)

Here are some screenshots:

Screenshot 2022-07-27 at 16-41-30 Open Source at Harvard

Screenshot 2022-07-27 at 16-41-43 README_private txt - Open Source at Harvard

Is there a release notes update needed for this change?:

No.

Additional documentation:

None.

@sekmiller sekmiller self-assigned this Jul 28, 2022
@sekmiller sekmiller removed their assignment Jul 28, 2022
@pdurbin
Copy link
Member Author

pdurbin commented Aug 3, 2022

I just merged the latest from develop into this branch to pick up the 5.11.1 changes.

@kcondon kcondon self-assigned this Aug 3, 2022
@kcondon kcondon merged commit 8f73098 into develop Aug 3, 2022
@kcondon kcondon deleted the 8742-valid-toa branch August 3, 2022 19:49
@pdurbin pdurbin added this to the 5.12 milestone Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

broken kebab on file listing page when dataset out of compliance with new (5.11) terms policy

3 participants