{"action":"closed","issue":{"url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/724","repository_url":"https://api.github.com/repos/nopSolutions/nopCommerce","labels_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/724/labels{/name}","comments_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/724/comments","events_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/724/events","html_url":"https://github.com/nopSolutions/nopCommerce/issues/724","id":127380243,"number":724,"title":"Guest checkout customers not able to view order details (including PDF and Print) on other devices","user":{"login":"mariannk","id":16681184,"avatar_url":"https://avatars.githubusercontent.com/u/16681184?v=3","gravatar_id":"","url":"https://api.github.com/users/mariannk","html_url":"https://github.com/mariannk","followers_url":"https://api.github.com/users/mariannk/followers","following_url":"https://api.github.com/users/mariannk/following{/other_user}","gists_url":"https://api.github.com/users/mariannk/gists{/gist_id}","starred_url":"https://api.github.com/users/mariannk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariannk/subscriptions","organizations_url":"https://api.github.com/users/mariannk/orgs","repos_url":"https://api.github.com/users/mariannk/repos","events_url":"https://api.github.com/users/mariannk/events{/privacy}","received_events_url":"https://api.github.com/users/mariannk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-01-19T07:04:08Z","updated_at":"2016-07-27T11:39:34Z","closed_at":"2016-07-27T11:39:34Z","body":"Currently, OrderController.Details (along with the PDF and Print siblings) have these check:\r\n```\r\nvar order = _orderService.GetOrderById(orderId);\r\nif (order == null || order.Deleted || _workContext.CurrentCustomer.Id != order.CustomerId)\r\n     return new HttpUnauthorizedResult();\r\n```\r\n\r\nWhich means Guest Checkout customers are not able to view their product details in a new browser session after the order is placed. \r\n\r\nOne way to overcome this is to have a supplementary parameter (OrderGuid for example) supplied together with OrderId. And then in CustomerNotifications message templates, we include this field in the links. In the controller, we can check using code similar to the following:\r\n```\r\n//'guid' is a function parameter\r\nif (order == null || order.Deleted || \r\n    (!order.OrderGuid.Equals(guid) && _workContext.CurrentCustomer.Id != order.CustomerId))\r\n```"}}
{"actor":{"display_login":"AndreiMaz"}}