Skip to content

Commit

Permalink
UIORGS-388 Update perms hierarchy for repeatable fields usage
Browse files Browse the repository at this point in the history
  • Loading branch information
usavkov-epam committed Nov 22, 2023
1 parent 93da350 commit ad2e98b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const OrganizationBankingInfoForm = () => {
<FieldArray
addLabel={<FormattedMessage id="ui-organizations.button.bankingInformation.add" />}
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}
Expand Down
2 changes: 1 addition & 1 deletion src/Organizations/OrganizationForm/OrganizationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const OrganizationForm = ({
</Accordion>

{isBankingInformationEnabled && (
<IfPermission perm="ui-organizations.banking-information.create">
<IfPermission perm="ui-organizations.banking-information.edit">
<Accordion
id={ORGANIZATION_SECTIONS.bankingInformationSection}
label={ORGANIZATION_SECTION_LABELS[ORGANIZATION_SECTIONS.bankingInformationSection]}
Expand Down
6 changes: 3 additions & 3 deletions translations/ui-organizations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,9 @@
"permission.acqUnits.assign": "Organizations: Assign acquisition units to new organization",
"permission.acqUnits.manage": "Organizations: Manage acquisition units",
"permission.banking-information.view": "Organizations: View banking information",
"permission.banking-information.create": "Organizations: View and create banking information",
"permission.banking-information.edit": "Organizations: View, create and edit banking information",
"permission.banking-information.delete": "Organizations: View, create, edit and delete banking information",
"permission.banking-information.edit": "Organizations: View and edit banking information",
"permission.banking-information.create": "Organizations: View, edit and create banking information",
"permission.banking-information.delete": "Organizations: View, edit, create and delete banking information",
"permission.settings.view": "Settings (Organizations): View settings",
"permission.settings": "Settings (Organizations): Can view and edit settings"
}

0 comments on commit ad2e98b

Please sign in to comment.