ems-frontend
ems-frontend copied to clipboard
feat/AB#91678-Add-permission-for-grid-data-export
Description
- Updated resource model to include new download permission
- Updated DashboardService adding the getResourceDownloadPermission method so grids and summary cards widgets can check if user has role with permission to display the download/export button
- Update role resources to include the new download permission to the resources (also available when adding filters to the role resources permission)
Useful links
- Please insert link to ticket: https://dev.azure.com/WHOHQ/EMSSAFE/_workitems/edit/91678
- Please insert link to back-end branch if any: https://github.com/ReliefApplications/ems-backend/pull/1047
Type of change
- [x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
As the attached videos.
Screenshots
Download permission with filters: download-permission-filters2.webm
See permission grants download permission: download-permission.webm
In front-office, role without download permission can't see export/download buttons in grids and summary cards widgets: without-download-button.webm
Checklist:
( * == Mandatory )
- [x] * I have set myself as assignee of the pull request
- [x] * My code follows the style guidelines of this project
- [x] * Linting does not generate new warnings
- [x] * I have performed a self-review of my own code
- [x] * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
- [x] * I have commented my code, particularly in hard-to-understand areas
- [x] * I have put JSDoc comment in all required places
- [x] * My changes generate no new warnings
- [x] * I have included screenshots describing my changes if relevant
- [x] * I have selected labels in the Pull Request, according to the changes with code brings
- [ ] I have made corresponding changes to the documentation ( if required )
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
More explanation
https://www.loom.com/share/05a716d61b9744faaf51fb304c21d1e5?sid=f87cf896-582a-4f76-93ae-8ceed801b145