logout fix

This commit is contained in:
Rushabh Mehta 2011-11-08 10:39:52 +05:30
parent cc02fd445c
commit efd222b6ac
3 changed files with 11 additions and 10 deletions

View File

@ -31,6 +31,8 @@ class DocType:
def get_modules(self):
rl = webnotes.user.get_roles()
ml = sql("select distinct t1.name, t1.module_icon, t1.module_label, t1.module_desc, t1.module_page from `tabModule Def` t1, `tabModule Def Role` t2 where t2.role in ('%s') and t1.disabled !='Yes' and ifnull(t1.is_hidden, 'No') != 'Yes' and t1.name = t2.parent order by t1.module_seq asc" % "','".join(rl), as_dict=1)
webnotes.response['login_url'] = session['data'].get('login_from', '')
return ml
def get_module_details(self,m):
@ -48,8 +50,6 @@ class DocType:
AND t2.role IN ("%s")
AND ifnull(standard,"No")="No"''' % (m, '", "'.join(webnotes.user.get_roles())), as_dict=1)
ret['login_url'] = session['data'].get('login_from', '')
return ret
# ----------------------------------------------------------------------------------------------------------------

View File

@ -56,6 +56,14 @@ pscript.startup_make_sidebar = function() {
// menu
var ml = r.message;
// login-file
if(r.login_url){
login_file = 'http://' + r.login_url;
}
else if(pscript.is_erpnext_saas) {
login_file = 'https://www.erpnext.com';
}
// clear
page_body.left_sidebar.innerHTML = '';
@ -292,13 +300,6 @@ SidebarItem.prototype.show_items = function() {
}
}
if(r.login_url){
login_file = 'http://' + r.login_url;
}
else if(pscript.is_erpnext_saas) {
login_file = 'https://www.erpnext.com';
}
$(me.items_area).slideDown();

View File

@ -3,7 +3,7 @@
<meta charset="utf-8">
<title>ERPNext</title>
<meta name="author" content="">
<script type="text/javascript">window._version_number="66"
<script type="text/javascript">window._version_number="67"
wn={}
wn.provide=function(namespace){var nsl=namespace.split('.');var l=nsl.length;var parent=window;for(var i=0;i<l;i++){var n=nsl[i];if(!parent[n]){parent[n]={}}