Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
refactor(authz): Make connector list accessible by operation groups (#6792)
Mani Chandra6081283afc5a
diff --git a/crates/router/src/routes/admin.rs b/crates/router/src/routes/admin.rsindex 80d22ad22b..a57fd56e6c 100644--- a/crates/router/src/routes/admin.rs+++ b/crates/router/src/routes/admin.rs@@ -431,7 +431,10 @@ pub async fn connector_retrieve(&auth::AdminApiAuthWithMerchantIdFromHeader,&auth::JWTAuthMerchantFromRoute {merchant_id,- required_permission: Permission::ProfileConnectorRead,+ // This should ideally be ProfileConnectorRead, but since this API responds with+ // sensitive data, keeping this as ProfileConnectorWrite+ // TODO: Convert this to ProfileConnectorRead once data is masked.+ required_permission: Permission::ProfileConnectorWrite,},req.headers(),),diff --git a/crates/router/src/services/authorization/permission_groups.rs b/crates/router/src/services/authorization/permission_groups.rsindex 14eda547e8..ceb943950d 100644--- a/crates/router/src/services/authorization/permission_groups.rs+++ b/crates/router/src/services/authorization/permission_groups.rs@@ -61,8 +61,12 @@ impl PermissionGroupExt for PermissionGroup {fn accessible_groups(&self) -> Vec<Self> {match self {- Self::OperationsView => vec![Self::OperationsView],- Self::OperationsManage => vec![Self::OperationsView, Self::OperationsManage],+ Self::OperationsView => vec![Self::OperationsView, Self::ConnectorsView],+ Self::OperationsManage => vec![+ Self::OperationsView,+ Self::OperationsManage,+ Self::ConnectorsView,+ ],Self::ConnectorsView => vec![Self::ConnectorsView],Self::ConnectorsManage => vec![Self::ConnectorsView, Self::ConnectorsManage],