diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f96abd3b..bf658dbc2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@
## [9.2.3] IN PROGRESS
* Reset `qindex` once the search field is empty. Fixes STSMACOM-872.
+* Use `` and `stripes.hasAnyPerm` to check for Notes assign/unassign perm. Fixes STSMACOM-875.
## [9.2.0](https://github.com/folio-org/stripes-smart-components/tree/v9.2.0) (2024-10-11)
[Full Changelog](https://github.com/folio-org/stripes-smart-components/compare/v9.1.3...v9.2.0)
diff --git a/lib/CustomFields/components/CustomFieldsForm/components/DeleteModal/tests/DeleteModal-test.js b/lib/CustomFields/components/CustomFieldsForm/components/DeleteModal/tests/DeleteModal-test.js
index 2f0a6f0b8..cd81681b8 100644
--- a/lib/CustomFields/components/CustomFieldsForm/components/DeleteModal/tests/DeleteModal-test.js
+++ b/lib/CustomFields/components/CustomFieldsForm/components/DeleteModal/tests/DeleteModal-test.js
@@ -13,7 +13,7 @@ import {
} from '../../../../../../../tests/helpers';
import fetchUsageStatistics from '../../../tests/helpers/fetchUsageStatistics';
-describe('DeleteModal', () => {
+describe.only('DeleteModal', () => {
setupApplication();
const deleteModal = new DeleteModalInteractor();
@@ -49,15 +49,20 @@ describe('DeleteModal', () => {
});
describe('when fields stats have loaded', () => {
- let a11yResults = null;
-
beforeEach(async () => {
await deleteModal.whenLoaded();
- a11yResults = await axe.run();
});
- it('should not have any a11y issues', () => {
- expect(a11yResults.violations).to.be.empty;
+ describe('when checking for a11y issues', () => {
+ let a11yResults = null;
+
+ beforeEach(async () => {
+ a11yResults = await axe.run();
+ });
+
+ it('should not have any a11y issues', () => {
+ expect(a11yResults.violations).to.be.empty;
+ });
});
it('should not show loading icon', () => {
diff --git a/lib/Notes/NoteViewPage/components/NoteView/NoteView.js b/lib/Notes/NoteViewPage/components/NoteView/NoteView.js
index 5b7ede8d6..4e5e3ded1 100644
--- a/lib/Notes/NoteViewPage/components/NoteView/NoteView.js
+++ b/lib/Notes/NoteViewPage/components/NoteView/NoteView.js
@@ -7,6 +7,7 @@ import dompurify from 'dompurify';
import {
IfPermission,
+ IfAnyPermission,
AppIcon,
withStripes,
stripesShape,
@@ -147,7 +148,7 @@ export default class NoteView extends Component {
} = this.props;
- const canAssignUnassign = stripes.hasPerm('ui-notes.item.assign-unassign');
+ const canAssignUnassign = stripes.hasAnyPerm('ui-notes.item.assign-unassign,ui-notes.item.assign-unassign.execute');
const canDelete = stripes.hasPerm('ui-notes.item.delete');
const canEdit = stripes.hasPerm('ui-notes.item.edit');
@@ -162,7 +163,7 @@ export default class NoteView extends Component {
<>
{
canUnassign &&
-
+
-
+
}