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

UIQM-723: Update permissions. #751

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
* [UIQM-711](https://issues.folio.org/browse/UIQM-711) Update `validateFixedFieldPositions` to display all 008 field errors instead of one in Bibliographic records.
* [UIQM-712](https://issues.folio.org/browse/UIQM-712) In field 007 for Projected Graphic type: change the `MfS` field type to `Byte` to allow only 1 character to be entered.
* [UIQM-715](https://issues.folio.org/browse/UIQM-715) Reuse existing ids for fields after saving a record to avoid re-rendering and be able to focus on a field by ref.
* [UIQM-723](https://issues.folio.org/browse/UIQM-723) Rename permissions.

## [8.0.1] (https://github.com/folio-org/ui-quick-marc/tree/v8.0.1) (2024-04-18)

Expand Down
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"marc-records-editor.status.item.get",
"marc-specifications.item.get",
"mod-settings.entries.collection.get",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check.manage",
"marc-records-editor.validate.post"
],
"visible": true
Expand All @@ -62,7 +62,7 @@
"instance-authority-links.instances.collection.put",
"marc-specifications.item.get",
"mod-settings.entries.collection.get",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check.manage",
"marc-records-editor.validate.post"
],
"visible": true
Expand Down Expand Up @@ -99,8 +99,9 @@
"visible": true
},
{
"permissionName": "ui-quick-marc.quick-marc-editor.duplicate",
"permissionName": "ui-quick-marc.quick-marc-editor.duplicate.execute",
Dmytro-Melnyshyn marked this conversation as resolved.
Show resolved Hide resolved
"displayName": "quickMARC: Derive new MARC bibliographic record",
"replaces": ["ui-quick-marc.quick-marc-editor.duplicate"],
"subPermissions": [
"ui-quick-marc.quick-marc-editor.view",
"marc-records-editor.status.item.get",
Expand All @@ -110,7 +111,7 @@
"instance-authority-links.instances.collection.put",
"marc-specifications.item.get",
"mod-settings.entries.collection.get",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check.manage",
"marc-records-editor.validate.post"
],
"visible": true
Expand All @@ -127,7 +128,7 @@
"marc-records-editor.status.item.get",
"marc-specifications.item.get",
"mod-settings.entries.collection.get",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check.manage",
"marc-records-editor.validate.post"
],
"visible": true
Expand All @@ -142,14 +143,15 @@
"marc-specifications.item.get",
"search.authorities.collection.get",
"mod-settings.entries.collection.get",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check.manage",
"marc-records-editor.validate.post"
],
"visible": true
},
{
"permissionName": "ui-quick-marc.quick-marc-authority-records.linkUnlink",
"permissionName": "ui-quick-marc.quick-marc-authority-records.link-unlink.execute",
"displayName": "quickMARC: Can Link/unlink authority records to bib records",
"replaces": ["ui-quick-marc.quick-marc-authority-records.linkUnlink"],
"subPermissions": [
"instance-authority.linking-rules.collection.get",
"inventory-storage.authority-source-files.collection.get",
Expand All @@ -162,20 +164,20 @@
"displayName": "Edit, View: Enable duplicate LCCN (010 $a) checking of MARC bibliographic and authority records",
"subPermissions": [
"mod-settings.entries.collection.get",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check",
"mod-settings.global.read.ui-quick-marc.lccn-duplicate-check.manage",
"mod-settings.entries.item.post",
"mod-settings.entries.item.put",
"mod-settings.global.write.ui-quick-marc.lccn-duplicate-check"
"mod-settings.global.write.ui-quick-marc.lccn-duplicate-check.manage"
],
"visible": false
},
{
"permissionName": "mod-settings.global.read.ui-quick-marc.lccn-duplicate-check",
"permissionName": "mod-settings.global.read.ui-quick-marc.lccn-duplicate-check.manage",
"displayName": "Settings (MARC): read LCCN duplicate check settings",
"visible": false
},
{
"permissionName": "mod-settings.global.write.ui-quick-marc.lccn-duplicate-check",
"permissionName": "mod-settings.global.write.ui-quick-marc.lccn-duplicate-check.manage",
"displayName": "Settings (MARC): write LCCN duplicate check settings",
"visible": false
}
Expand Down
2 changes: 1 addition & 1 deletion src/QuickMarc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const QuickMarc = ({
},
{
path: `${basePath}/duplicate-bib/:externalId`,
permission: 'ui-quick-marc.quick-marc-editor.duplicate',
permission: 'ui-quick-marc.quick-marc-editor.duplicate.execute',
props: {
action: QUICK_MARC_ACTIONS.DERIVE,
wrapper: QuickMarcDeriveWrapper,
Expand Down
2 changes: 1 addition & 1 deletion src/QuickMarcEditor/AutoLinkingButton/AutoLinkingButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const AutoLinkingButton = ({
}

return (
<IfPermission perm="ui-quick-marc.quick-marc-authority-records.linkUnlink">
<IfPermission perm="ui-quick-marc.quick-marc-authority-records.link-unlink.execute">
<Button
marginBottom0
disabled={!hasAutoLinkableRecord || isLoadingLinkSuggestions}
Expand Down
2 changes: 1 addition & 1 deletion src/QuickMarcEditor/QuickMarcEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ const QuickMarcEditor = ({
/>
{
confirmRemoveAuthorityLinking && (
<IfPermission perm="ui-quick-marc.quick-marc-authority-records.linkUnlink">
<IfPermission perm="ui-quick-marc.quick-marc-authority-records.link-unlink.execute">
<ConfirmationModal
id="quick-marc-remove-authority-linking-confirm-modal"
open={isUnlinkRecordsModalOpen}
Expand Down
2 changes: 1 addition & 1 deletion src/QuickMarcEditor/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ export const isRecordForManualLinking = (
isRequestToCentralTenantFromMember,
onCheckCentralTenantPerm,
) => {
const permission = 'ui-quick-marc.quick-marc-authority-records.linkUnlink';
const permission = 'ui-quick-marc.quick-marc-authority-records.link-unlink.execute';

return (
marcType === MARC_TYPES.BIB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { MARC_TYPES } from '../../common/constants';

const KEY = 'lccn-duplicate-check';
const SCOPE = 'ui-quick-marc.lccn-duplicate-check';
const SCOPE = 'ui-quick-marc.lccn-duplicate-check.manage';

const useLccnDuplicateConfig = ({ marcType }) => {
const ky = useOkapiKy();
Expand Down
4 changes: 2 additions & 2 deletions translations/ui-quick-marc/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"permission.quick-marc-holdings-editor.view": "quickMARC: View MARC holdings record",
"permission.quick-marc-holdings-editor.all": "quickMARC: View, edit MARC holdings record",
"permission.quick-marc-holdings-editor.create": "quickMARC: Create a new MARC holdings record",
"permission.quick-marc-editor.duplicate": "quickMARC: Derive new MARC bibliographic record",
"permission.quick-marc-editor.duplicate.execute": "quickMARC: Derive new MARC bibliographic record",
"permission.quick-marc-editor.create": "quickMARC: Create a new MARC bibliographic record",
"permission.quick-marc-authorities-editor.create": "quickMARC: Create a new MARC authority record",
"permission.quick-marc-authorities-editor.all": "quickMARC: View, edit MARC authorities record",
"permission.quick-marc-authority-records.linkUnlink": "quickMARC: Can Link/unlink authority records to bib records",
"permission.quick-marc-authority-records.link-unlink.execute": "quickMARC: Can Link/unlink authority records to bib records",

"holdings-record.create.title": "Create a new MARC Holdings record",
"bibliographic-record.create.title": "Create a new {shared, select, true {shared} false {local} other {}} MARC bib record",
Expand Down