From 8e5fc2487586f818823e972ded388c58f4dcc98b Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 13:07:43 +0000 Subject: [PATCH 1/3] chore(version): 2024.10.08.2 --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fdb4c62c..51eb8926a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [conven - - - +## 2024.10.08.2 + +### Features + +- Addition of new connector "NEXIXPAY" ([#1569](https://github.com/juspay/hyperswitch-control-center/pull/1569)) ([`8437983`](https://github.com/juspay/hyperswitch-control-center/commit/8437983269d3554d4abd0ab3a6649ddf88da373e)) + +**Full Changelog:** [`2024.10.08.1...2024.10.08.2`](https://github.com/juspay/hyperswitch-control-center/compare/2024.10.08.1...2024.10.08.2) + +- - - + ## 2024.10.08.1 ### Features From ebc0a33b21dc9ecfb50cc812161f05b1debeead7 Mon Sep 17 00:00:00 2001 From: Riddhiagrawal001 <50551695+Riddhiagrawal001@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:51:51 +0530 Subject: [PATCH 2/3] chore: user-permission type change (#1577) --- src/Recoils/HyperswitchAtom.res | 9 +- src/components/ACLButton.res | 6 +- src/components/ACLButton.resi | 2 +- src/components/ACLDiv.res | 6 +- src/components/ACLDiv.resi | 2 +- src/components/tooltip/ACLToolTip.res | 4 +- src/components/tooltip/ACLToolTip.resi | 2 +- src/container/AnalyticsContainer.res | 12 +- src/container/BusinessProfileContainer.res | 4 +- src/container/ConnectorContainer.res | 32 ++-- src/container/MerchantAccountContainer.res | 13 +- src/container/TransactionContainer.res | 11 +- src/container/UserManagementContainer.res | 14 +- src/entryPoints/HyperSwitchApp.res | 76 ++++----- src/entryPoints/Provider/GlobalProvider.res | 1 + src/entryPoints/Provider/ProviderHelper.res | 1 - src/entryPoints/SidebarValues.res | 149 +++++++++--------- src/screens/APIUtils/APIUtils.res | 6 +- src/screens/APIUtils/APIUtilsTypes.res | 4 +- .../GlobalSearch/GlobalSearchBar.res | 4 +- .../GlobalSearchResults/SearchResultsPage.res | 5 +- .../HomePageOverviewComponent.res | 9 +- .../ConfigurePMTs/PaymentMethodConfig.res | 4 +- src/screens/Connectors/ConnectorList.res | 4 +- .../Connectors/ConnectorTableUtils.res | 6 +- .../Developer/APIKeys/KeyManagement.res | 4 +- .../PaymentSettings/PaymentSettingsList.res | 7 +- .../PaymentSettingsListEntity.res | 6 +- src/screens/Disputes/ShowDisputes.res | 5 +- src/screens/FraudAndRisk/FRMSelect.res | 8 +- src/screens/FraudAndRisk/FRMTableUtils.res | 6 +- .../GenerateReports/GenerateReport.res | 10 +- src/screens/Hooks/ClearRecoilValueHook.res | 4 +- src/screens/Hooks/GroupACLHooks.res | 72 +++++++++ src/screens/OMPSwitch/OMPSwitchHelper.res | 8 +- src/screens/Order/OrderUIUtils.res | 6 +- src/screens/Order/ShowOrder.res | 11 +- .../PMAuthenticationConnectorList.res | 4 +- .../PMAuthenticationTableEntity.res | 6 +- .../PayoutRouting/PayoutHistoryTable.res | 7 +- .../PayoutHistoryTableEntity.res | 6 +- src/screens/Processors/ProcessorCards.res | 12 +- src/screens/Refunds/ShowRefund.res | 9 +- src/screens/Routing/ActiveRouting.res | 10 +- src/screens/Routing/History.res | 7 +- src/screens/Routing/HistoryEntity.res | 6 +- src/screens/Settings/BusinessDetails.res | 4 +- .../BusinessMapping/BusinessProfile.res | 4 +- src/screens/Settings/HSwitchSettings.res | 6 +- src/screens/Surcharge/Surcharge.res | 4 +- src/screens/TaxProcessor/TaxProcessorList.res | 4 +- .../TaxProcessor/TaxProcessorTableEntity.res | 6 +- src/screens/ThreeDSFlow/HSwitchThreeDS.res | 4 +- .../ThreeDsConnectorList.res | 4 +- .../ThreeDsProcessors/ThreeDsTableEntity.res | 6 +- .../UserRevamp/CreateCustomRole.res | 4 +- .../UserRevamp/GroupAccessUtils.res | 8 + .../UserManagement/UserRevamp/ListRoles.res | 4 +- .../UserRevamp/ListRolesTableEntity.res | 8 +- .../UserManagement/UserRevamp/ListUsers.res | 4 +- .../UserRevamp/NewUserInvitationForm.res | 10 +- .../UserRevamp/PermissionUtils.res | 92 ----------- .../UserManagement/UserRevamp/UserInfo.res | 6 +- .../UserRevamp/UserManagementTypes.res | 12 +- .../UserRevamp/UserManagementUtils.res | 45 ------ src/utils/AccessControl.res | 4 +- src/utils/Mappers/GroupACLMapper.res | 82 ++++++++++ 67 files changed, 477 insertions(+), 444 deletions(-) create mode 100644 src/screens/Hooks/GroupACLHooks.res create mode 100644 src/screens/UserManagement/UserRevamp/GroupAccessUtils.res delete mode 100644 src/screens/UserManagement/UserRevamp/PermissionUtils.res create mode 100644 src/utils/Mappers/GroupACLMapper.res diff --git a/src/Recoils/HyperswitchAtom.res b/src/Recoils/HyperswitchAtom.res index 333b12a3a..39e30dabc 100644 --- a/src/Recoils/HyperswitchAtom.res +++ b/src/Recoils/HyperswitchAtom.res @@ -23,11 +23,16 @@ let paypalAccountStatusAtom: Recoil.recoilAtom = Recoil.atom( +// TODO: remove this after userGroupPermissionsAtom is stable +let userPermissionAtom: Recoil.recoilAtom = Recoil.atom( "userPermissionAtom", - PermissionUtils.defaultValueForPermission, + GroupACLMapper.defaultValueForGroupAccessJson, ) +let userGroupACLAtom: Recoil.recoilAtom< + option>, +> = Recoil.atom("userGroupACLAtom", None) + let switchMerchantListAtom: Recoil.recoilAtom< array, > = Recoil.atom("switchMerchantListAtom", [SwitchMerchantUtils.defaultValue]) diff --git a/src/components/ACLButton.res b/src/components/ACLButton.res index 89f449ba5..71a9ef501 100644 --- a/src/components/ACLButton.res +++ b/src/components/ACLButton.res @@ -28,16 +28,16 @@ let make = ( ~customHeightClass=?, ~customBackColor=?, ~showBtnTextToolTip=false, - ~access=CommonAuthTypes.Access, + ~authorization=CommonAuthTypes.Access, ~tooltipText=HSwitchUtils.noAccessControlText, ~toolTipPosition=?, ) => { - let buttonState = switch access { + let buttonState = switch authorization { | Access => buttonState | NoAccess => Button.Disabled } - let showBtnTextToolTip = access === NoAccess + let showBtnTextToolTip = authorization === NoAccess