Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@em-ingram
Copy link
Contributor

@em-ingram em-ingram commented Oct 30, 2019

https://ctds-planx.atlassian.net/browse/PXP-3968

  • Bug: Sometimes, the download button in explorer (button type='data') is not disabled when viewing metadata or files the user does not have access to.
  • Cause: Data from guppy is validated using the 'accessibleValidationField' in the guppy config, but the 'accessibleValidationField' was not always included by default in the data requested from guppy. If the 'accessibleValidationField' was not included, the data validation check that enables/disables the 'data' button would fail and default to 'enabled.'
  • Fix: Always fetch 'accessibleValidationField' from guppy. This is done by always fetching the fields in 'accessibleFieldCheckList', which includes 'accessibleValidationField'.

Bug Fixes

Fix bug in Windmill explorer in which download buttons would sometimes appear to be enabled, even if users didn't have access to all data.

- Bug: Sometimes, the download button in explorer (button type='data') is not disabled
  when viewing metadata or files the user does not have access to.
- Cause: Data from guppy is validated using the 'accessibleValidationField' in the guppy config,
  but the 'accessibleValidationField' was not always included by default in the data requested from
  guppy. If the 'accessibleValidationField' was not included, the data validation check that enables/
  disables the 'data' button would fail and default to 'enabled.'
- Fix: Always fetch 'accessibleValidationField' from guppy. This is done by always fetching
  the fields in 'accessibleFieldCheckList', which includes 'accessibleValidationField'.
onProcessFilterAggsData: PropTypes.func,
onUpdateAccessLevel: PropTypes.func,
adminAppliedPreFilters: PropTypes.object,
accessibleFieldCheckList: PropTypes.arrayOf(PropTypes.string),
Copy link
Contributor Author

@em-ingram em-ingram Oct 30, 2019

Choose a reason for hiding this comment

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

GuppyWrapper now passes accessibleFieldChecklist down as props to its children (including ConnectedFilter.)

@em-ingram em-ingram changed the title Fix(pxp-3968): Fix explorer download button not disabled Fix(PXP-3968): Fix explorer download button not disabled Oct 30, 2019
@mfshao
Copy link
Contributor

mfshao commented Oct 30, 2019

cool! is this branch deployed to your dev env now?

@em-ingram
Copy link
Contributor Author

cool! is this branch deployed to your dev env now?

Not yet -- it was just on my local! I'll deploy it to my portal, I'll message when it's up.

@em-ingram
Copy link
Contributor Author

This version of guppy is running on my dev commons at https://mpingram.planx-pla.net/explorer. (Use dev_login: [email protected] to replicate the conditions the bug was found in)

@em-ingram em-ingram requested a review from mfshao November 1, 2019 20:10
Copy link
Contributor

@mfshao mfshao left a comment

Choose a reason for hiding this comment

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

👍

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