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

[DUOS-2452] DAC Dataset Acceptance => Public Visibility #2305

Merged
merged 5 commits into from
Aug 11, 2023

Conversation

kaitlynoflaherty
Copy link
Contributor

@kaitlynoflaherty kaitlynoflaherty commented Aug 8, 2023

Addresses

https://broadworkbench.atlassian.net/jira/software/c/projects/DUOS/boards/123?modal=detail&selectedIssue=DUOS-2452

Summary

A dataset should only be visible if Public Visibility is YES and it is ACCEPTED by the DAC,
unless it is an open access or external access dataset in which case it only needs Public Visibility to be set to YES.
Unless/until we migrate legacy datasets to have studies we rely on the Active dataset prop


Have you read Terra's Contributing Guide lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@kaitlynoflaherty kaitlynoflaherty marked this pull request as ready for review August 9, 2023 14:44
@kaitlynoflaherty kaitlynoflaherty requested a review from a team as a code owner August 9, 2023 14:44
const openAccess = extractDatasetProp('Open Access', dataset);
if(!isNil(openAccess)){
// if open Access is false, dac approval required
return openAccess ? dataset.study.publicVisibility : (dataset.dacApproval && dataset.study.publicVisibility);
Copy link
Contributor

Choose a reason for hiding this comment

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

study can be null, do we need null-safe traversal here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thinking was since the openAccess is a property on a study, if openAccess is not null then the study must exist.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's true today, but the code doesn't enforce that currently and could be incorrect in the near future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Do you think that a good approach would be to just add dataset.study?.publicVisibility or do more thorough handling here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's fine for this case.

Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

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

One suggestion inline, otherwise 👍🏽

Copy link
Contributor

@fboulnois fboulnois left a comment

Choose a reason for hiding this comment

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

Glad we're simplifying this logic 👍

@kaitlynoflaherty kaitlynoflaherty merged commit ce59caf into develop Aug 11, 2023
10 checks passed
@kaitlynoflaherty kaitlynoflaherty deleted the ko-duos-2452 branch August 11, 2023 22:28
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.

3 participants