Commit 3d898163 authored by anrikun's avatar anrikun Committed by rszrama

Issue #2321205 by anrikun, rszrama, mglaman: check the proper access when...

Issue #2321205 by anrikun, rszrama, mglaman: check the proper access when generating an order URI in the Order UI module.
parent 72873ea0
......@@ -232,8 +232,9 @@ function commerce_order_ui_order_uri($order) {
return $uri;
}
// Only return a value if the user has permission to view the order.
if (commerce_order_access('view', $order)) {
// Only return a value if the user has permission to view the order at its
// admin URI.
if (commerce_order_admin_order_view_access($order)) {
return array(
'path' => 'admin/commerce/orders/' . $order->order_id,
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment