Merge pull request #48 from nijil/master
Remove popup message in login validation
This commit is contained in:
commit
dc033fe219
3 changed files with 8 additions and 9 deletions
|
|
@ -184,7 +184,6 @@ class VersionControl:
|
|||
"""
|
||||
import os
|
||||
for wt in os.walk(self.root_path, followlinks = True):
|
||||
|
||||
# ignore folders
|
||||
for folder in self.ignore_folders:
|
||||
if folder in wt[1]:
|
||||
|
|
@ -455,4 +454,4 @@ if __name__=='__main__':
|
|||
import os, sys
|
||||
sys.path.append('py')
|
||||
sys.path.append('lib/py')
|
||||
unittest.main()
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ pscript.onLoginReply = function(r, rtext) {
|
|||
if(r.message=="Logged In"){
|
||||
window.location.href='index.html' + (get_url_arg('page') ? ('?page='+get_url_arg('page')) : '');
|
||||
} else {
|
||||
$i('login_message').innerHTML = '<span style="color: RED;">'+eval(r.message)+'</span>';
|
||||
$i('login_message').innerHTML = '<span style="color: RED;">'+(r.message)+'</span>';
|
||||
//if(r.exc)alert(r.exc);
|
||||
}
|
||||
}
|
||||
|
|
@ -53,4 +53,4 @@ pscript.show_forgot_password = function(){
|
|||
}
|
||||
d.show();
|
||||
pscript.forgot_dialog = d;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,10 +137,9 @@ class LoginManager:
|
|||
def authenticate(self, user=None, pwd=None):
|
||||
if not (user and pwd):
|
||||
user, pwd = webnotes.form_dict.get('usr'), webnotes.form_dict.get('pwd')
|
||||
|
||||
if not (user and pwd):
|
||||
webnotes.msgprint('Incomplete Login Details', raise_exception=1)
|
||||
|
||||
webnotes.response['message'] = 'Incomplete Login Details'
|
||||
raise Exception
|
||||
# custom authentication (for single-sign on)
|
||||
self.load_control_panel()
|
||||
if hasattr(self.cp, 'authenticate'):
|
||||
|
|
@ -151,9 +150,10 @@ class LoginManager:
|
|||
p = webnotes.conn.sql("select name from tabProfile where name=%s and (`password`=%s OR `password`=PASSWORD(%s))", (user, pwd, pwd))
|
||||
else:
|
||||
p = webnotes.conn.sql("select name from tabProfile where name=%s and (`password`=%s OR `password`=PASSWORD(%s)) and IFNULL(enabled,0)=1", (user, pwd, pwd))
|
||||
|
||||
if not p:
|
||||
webnotes.msgprint('Authentication Failed', raise_exception=1)
|
||||
webnotes.response['message'] = 'Authentication Failed'
|
||||
raise Exception
|
||||
#webnotes.msgprint('Authentication Failed',raise_exception=1)
|
||||
|
||||
self.user = p[0][0]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue