Monday 22 January 2007 5:26:45 am
EzPublish 3.9 has a problem showing "my orders" from the user profile without granting admin privileges. This means that the user can see ALL of the orders in the system. In order to fix this I have modified the source code to correct the problem by adding a new rule to the shop's module.php to control access to the customerorderview function. If you need to fix this follow these instructions. Add "user_view_orders" into the access function Change...
$ViewList["customerorderview"] = array(
"functions" => array( 'administrate' ),
"script" => "customerorderview.php",
"default_navigation_part" => 'ezshopnavigationpart',
"params" => array( "CustomerID", "Email" ) );
To this...
$ViewList["customerorderview"] = array(
"functions" => array( 'user_view_orders', 'administrate' ),
"script" => "customerorderview.php",
"default_navigation_part" => 'ezshopnavigationpart',
"params" => array( "CustomerID", "Email" ) );
Then add ?$FunctionList['user_view_orders'] = array( );? to the bottom of the file. Change...
$FunctionList['setup'] = array( );
$FunctionList['administrate'] = array( );
$FunctionList['buy'] = array( );
$FunctionList['edit_status'] = array( );
$FunctionList['setstatus'] = array( 'FromStatus' => $FromStatus,
'ToStatus' => $ToStatus );
To this...
$FunctionList['setup'] = array( );
$FunctionList['administrate'] = array( );
$FunctionList['buy'] = array( );
$FunctionList['edit_status'] = array( );
$FunctionList['setstatus'] = array( 'FromStatus' => $FromStatus,
'ToStatus' => $ToStatus );
$FunctionList['user_view_orders'] = array( );
Then go to the Roles and Policies and add the shop / user_view_orders to the users permissions and your good to go.
Regards Fats
-- Stuart
[email protected]
http://www.grandmore.com
|