From ad2e98bfed46ad32b6bae8de2aee7525635ff40c Mon Sep 17 00:00:00 2001 From: Yury Saukou Date: Tue, 21 Nov 2023 21:12:43 +0400 Subject: [PATCH] UIORGS-388 Update perms hierarchy for repeatable fields usage --- package.json | 18 +++++++++--------- .../OrganizationBankingInfoForm.js | 1 + .../OrganizationForm/OrganizationForm.js | 2 +- translations/ui-organizations/en.json | 6 +++--- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index f50de274..2ffc7a08 100644 --- a/package.json +++ b/package.json @@ -159,29 +159,29 @@ ] }, { - "permissionName": "ui-organizations.banking-information.create", - "displayName": "Organizations: View and create banking information", + "permissionName": "ui-organizations.banking-information.edit", + "displayName": "Organizations: View and edit banking information", "visible": true, "subPermissions": [ "ui-organizations.banking-information.view", - "organizations.banking-information.item.post" + "organizations.banking-information.item.put" ] }, { - "permissionName": "ui-organizations.banking-information.edit", - "displayName": "Organizations: View, create and edit banking information", + "permissionName": "ui-organizations.banking-information.create", + "displayName": "Organizations: View, edit and create banking information", "visible": true, "subPermissions": [ - "ui-organizations.banking-information.create", - "organizations.banking-information.item.put" + "ui-organizations.banking-information.edit", + "organizations.banking-information.item.post" ] }, { "permissionName": "ui-organizations.banking-information.delete", - "displayName": "Organizations: View, create, edit and delete banking information", + "displayName": "Organizations: View, edit, create and delete banking information", "visible": true, "subPermissions": [ - "ui-organizations.banking-information.edit", + "ui-organizations.banking-information.create", "organizations.banking-information.item.delete" ] }, diff --git a/src/Organizations/OrganizationForm/OrganizationBankingInfoForm/OrganizationBankingInfoForm.js b/src/Organizations/OrganizationForm/OrganizationBankingInfoForm/OrganizationBankingInfoForm.js index 020d56ff..157d5377 100644 --- a/src/Organizations/OrganizationForm/OrganizationBankingInfoForm/OrganizationBankingInfoForm.js +++ b/src/Organizations/OrganizationForm/OrganizationBankingInfoForm/OrganizationBankingInfoForm.js @@ -57,6 +57,7 @@ export const OrganizationBankingInfoForm = () => { } component={BankingInformationFieldArray} + canAdd={stripes.hasPerm('ui-organizations.banking-information.create')} canRemove={stripes.hasPerm('ui-organizations.banking-information.delete')} id="bankingInformation" name={BANKING_INFORMATION_FIELD_NAME} diff --git a/src/Organizations/OrganizationForm/OrganizationForm.js b/src/Organizations/OrganizationForm/OrganizationForm.js index fb0854a1..2e3785c6 100644 --- a/src/Organizations/OrganizationForm/OrganizationForm.js +++ b/src/Organizations/OrganizationForm/OrganizationForm.js @@ -224,7 +224,7 @@ const OrganizationForm = ({ {isBankingInformationEnabled && ( - +