Skip to content

Commit

Permalink
UINV-559 Clean up permission names (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaSedyx authored Oct 21, 2024
1 parent ec24185 commit 60f20d8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Duplicate invoice and invoice lines. Refs UINV-552.
* Use `arrow-left` button as the trigger to return back to an invoice from a line. Refs UINV-505.
* Improve error message when attempting to save an invoice line when no budget for the fiscal year exists. Refs UINV-557.
* Clean up permission names. Refs UINV-559.


## [6.0.4](https://github.com/folio-org/ui-invoice/tree/v6.0.4) (2024-08-21)
Expand Down
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,51 +237,56 @@
]
},
{
"permissionName": "ui-invoice.approve",
"permissionName": "ui-invoice.invoice.approve.execute",
"displayName": "Invoice: Approve invoices",
"visible": true,
"description": "",
"replaces": ["ui-invoice.approve"],
"subPermissions": [
"finance.expense-classes.item.get",
"finance.funds.item.get",
"invoice.item.approve.execute"
]
},
{
"permissionName": "ui-invoice.pay",
"permissionName": "ui-invoice.invoice.pay.execute",
"displayName": "Invoice: Pay invoices",
"visible": true,
"description": "",
"replaces": ["ui-invoice.pay"],
"subPermissions": [
"finance.expense-classes.item.get",
"finance.funds.item.get",
"invoice.item.pay.execute"
]
},
{
"permissionName": "ui-invoice.payDifferentFY",
"permissionName": "ui-invoice.invoice.pay-different-fy.execute",
"displayName": "Invoice: Pay invoices in a different fiscal year",
"visible": true,
"replaces": ["ui-invoice.payDifferentFY"],
"subPermissions": [
"ui-invoice.pay",
"invoices.fiscal-year.update.execute"
]
},
{
"permissionName": "ui-invoice.cancel",
"permissionName": "ui-invoice.invoice.cancel.execute",
"displayName": "Invoice: Cancel invoices",
"visible": true,
"description": "",
"replaces": ["ui-invoice.cancel"],
"subPermissions": [
"invoice.invoices.item.put",
"invoice.item.cancel.execute"
]
},
{
"permissionName": "ui-invoice.voucherExport",
"permissionName": "ui-invoice.voucher.export.execute",
"displayName": "Invoice: Voucher export",
"visible": true,
"description": "",
"replaces": ["ui-invoice.voucherExport"],
"subPermissions": [
"batch-groups.collection.get",
"batch-voucher.batch-voucher-exports.collection.get",
Expand Down
2 changes: 1 addition & 1 deletion src/invoices/InvoiceForm/InvoiceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ const InvoiceForm = ({
validate={validateRequired}
/>
</Col>
<IfPermission perm="ui-invoice.payDifferentFY">
<IfPermission perm="ui-invoice.invoice.pay-different-fy.execute">
<Col xs={3}>
<FieldFiscalYear
id="invoice-fiscal-year"
Expand Down
2 changes: 1 addition & 1 deletion src/invoices/Invoices.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const Invoices = () => {
</PermissionedRoute>
<PermissionedRoute
path="/invoice/voucher-export"
perm="ui-invoice.voucherExport"
perm="ui-invoice.voucher.export.execute"
returnLink={RETURN_LINK}
returnLinkLabelId={RETURN_LINK_LABEL_ID}
>
Expand Down
2 changes: 1 addition & 1 deletion src/invoices/InvoicesList/InvoicesListLastMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const InvoicesListLastMenu = ({ onToggle, invoicesCount, toggleExportModa
</Button>
</IfPermission>

<IfPermission perm="ui-invoice.voucherExport">
<IfPermission perm="ui-invoice.voucher.export.execute">
<Button
id="clickable-voucher-export"
buttonStyle="dropdownItem"
Expand Down
10 changes: 5 additions & 5 deletions translations/ui-invoice/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -511,18 +511,18 @@

"permission.acq.unit.assignment.assign": "Invoice: Assign acquisitions units to new record",
"permission.acq.unit.assignment.manage": "Invoice: Manage acquisition units",
"permission.approve": "Invoice: Approve invoices",
"permission.batchVoucher.download": "Invoice: Download batch file from invoice record",
"permission.batchVoucher.exportConfigs.credentials.view": "Settings (Invoices): Batch group usernames and passwords: view",
"permission.batchVoucher.exportConfigs.credentials.edit": "Settings (Invoices): Batch group usernames and passwords: view and edit",
"permission.invoice.create": "Invoice: Can view, edit and create new Invoices and Invoice lines",
"permission.invoice.delete": "Invoice: Can view, edit and delete Invoices and Invoice lines",
"permission.invoice.edit": "Invoice: Can view and edit Invoices and Invoice lines",
"permission.invoice.view": "Invoice: Can view Invoices and Invoice lines",
"permission.pay": "Invoice: Pay invoices",
"permission.payDifferentFY": "Invoice: Pay invoices in a different fiscal year",
"permission.cancel": "Invoice: Cancel invoices",
"permission.invoice.approve.execute": "Invoice: Approve invoices",
"permission.invoice.pay.execute": "Invoice: Pay invoices",
"permission.invoice.pay-different-fy.execute": "Invoice: Pay invoices in a different fiscal year",
"permission.invoice.cancel.execute": "Invoice: Cancel invoices",
"permission.settings.all": "Settings (Invoices): Can view and edit settings",
"permission.voucherExport": "Invoice: Voucher export",
"permission.voucher.export.execute": "Invoice: Voucher export",
"permission.exportCSV": "Invoice: Export search results"
}

0 comments on commit 60f20d8

Please sign in to comment.