From 03b8f4e4d4cfeb95d77049d900567de8c3670cd4 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Tue, 28 Nov 2006 23:05:15 +0000 Subject: [PATCH] fix: Users not authorized for any payment gateway now get appropriate message --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Operation/Commerce.pm | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index a69da549e..596d6aa5d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -26,6 +26,7 @@ 7.2.3 - fix: minor bug with new template vars in Auth::createAccount - fix: How to get to List Pending Transactions screen? + - fix: Users not authorized for any payment gateway get appropriate message 7.2.2 - fix: Show Debugging option not working diff --git a/lib/WebGUI/Operation/Commerce.pm b/lib/WebGUI/Operation/Commerce.pm index 1cdb92850..5919837ee 100644 --- a/lib/WebGUI/Operation/Commerce.pm +++ b/lib/WebGUI/Operation/Commerce.pm @@ -1026,6 +1026,10 @@ sub www_selectPaymentGateway { my $paymentGateway = $pluginLoop[0]->{namespace}; return WebGUI::Operation::Commerce::www_selectPaymentGatewaySave($session, $paymentGateway); } + # If the user is not authorized for any payment gateways, error + elsif (scalar(@pluginLoop) < 1) { + return $session->privilege->noAccess(); + } $var{pluginLoop} = \@pluginLoop; $var{message} = $i18n->get('select payment gateway');