[website] [fix] fixes in support ticket and profile pages, when using guest user login

This commit is contained in:
Anand Doshi 2013-05-15 11:42:09 +05:30
parent 4430c0d718
commit 2e311acaa5
2 changed files with 6 additions and 2 deletions

View File

@ -114,7 +114,7 @@
"ticket": {
"no_cache": true,
"template": "app/website/templates/pages/ticket",
"get_website_args": "support.doctype.support_ticket.support_ticket.get_website_args"
"args_method": "support.doctype.support_ticket.support_ticket.get_website_args"
},
"tickets": {
"template": "app/website/templates/pages/tickets"
@ -122,6 +122,10 @@
"writers": {
"template": "app/website/templates/pages/writers",
"args_method": "website.helpers.blog.get_writers_args"
},
"profile": {
"no_cache": true,
"template": "app/website/templates/pages/profile"
}
},
"generators": {

View File

@ -86,7 +86,7 @@ def get_tickets():
webnotes.session.user, as_dict=1)
return tickets
def get_website_args():
def get_website_args():
bean = webnotes.bean("Support Ticket", webnotes.form_dict.name)
if bean.doc.raised_by != webnotes.session.user:
return {