Merge pull request #4076 from anandpdoshi/shopping-cart-order
check doc.has_website_permission in order.html. Merge after frappe/frappe#1316
This commit is contained in:
commit
142859f36e
@ -17,7 +17,7 @@ $(function() {
|
||||
|
||||
$.extend(shopping_cart, {
|
||||
update_cart: function(opts) {
|
||||
if(!full_name) {
|
||||
if(!full_name || full_name==="Guest") {
|
||||
if(localStorage) {
|
||||
localStorage.setItem("last_visited", window.location.pathname);
|
||||
localStorage.setItem("pending_add_to_cart", opts.item_code);
|
||||
|
@ -14,5 +14,5 @@ def get_context(context):
|
||||
|
||||
context.parents = frappe.form_dict.parents
|
||||
|
||||
if not context.doc.has_permission("read"):
|
||||
if not context.doc.has_website_permission("read"):
|
||||
frappe.throw(_("Not Permitted"), frappe.PermissionError)
|
||||
|
Loading…
x
Reference in New Issue
Block a user