Skip to content

Commit

Permalink
UIEXPMGR-83 A hyperlink on the "JobID" column is not clickable with U…
Browse files Browse the repository at this point in the history
…sers In app permissions (#131)
  • Loading branch information
NikitaSedyx committed Mar 20, 2023
1 parent b903f9f commit c88b937
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Change history for ui-export-manager

* A hyperlink on the "JobID" column is not clickable with Users In app permissions. Refs UIEXPMGR-83.

## [2.4.2](https://github.com/folio-org/ui-export-manager/tree/v2.4.2) (2023-03-16)
[Full Changelog](https://github.com/folio-org/ui-export-manager/compare/v2.4.0...v2.4.1)
[Full Changelog](https://github.com/folio-org/ui-export-manager/compare/v2.4.1...v2.4.2)

* Export Manager app | Authority control updates. Refs UIEXPMGR-68.

Expand Down
8 changes: 5 additions & 3 deletions src/common/components/ExportJobId/ExportJobId.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ export const ExportJobId = ({ job }) => {
const stripes = useStripes();
const { download: downloadSecurely } = useSecureDownload(id);

const hasCsvAnyPerms = stripes.hasPerm('ui-bulk-edit.view') || stripes.hasPerm('ui-bulk-edit.edit');
const hasAnyUserEditPerms = stripes.hasPerm('ui-bulk-edit.view')
|| stripes.hasPerm('ui-bulk-edit.edit')
|| stripes.hasPerm('ui-bulk-edit.app-edit.users');
const hasInAppAnyPerms = stripes.hasPerm('ui-bulk-edit.app-view') || stripes.hasPerm('ui-bulk-edit.app-edit');

const showUsersLink = hasCsvAnyPerms && entityType === 'USER';
const showUsersLink = hasAnyUserEditPerms && entityType === 'USER';
const showItemsLink = hasInAppAnyPerms && entityType === 'ITEM';
const showAnyLink = (hasCsvAnyPerms && hasInAppAnyPerms) || (!['USER', 'ITEM'].includes(entityType));
const showAnyLink = (hasAnyUserEditPerms && hasInAppAnyPerms) || (!['USER', 'ITEM'].includes(entityType));
const isShowLink = showUsersLink || showItemsLink || showAnyLink;

const downloadFiles = (e) => {
Expand Down

0 comments on commit c88b937

Please sign in to comment.