Mostrar mensaje no autorizado

This commit is contained in:
Mauricio Baeza 2017-12-12 17:34:07 -06:00
parent 0f82665722
commit c02f5dc25f
2 changed files with 3 additions and 11 deletions

View File

@ -325,19 +325,8 @@ class Certificado(object):
self._path_key = paths['path_key']
self._path_cer = paths['path_cer']
self._modulus = ''
#~ self._save_files()
self.error = ''
#~ def _save_files(self):
#~ try:
#~ self._path_key = _save_temp(bytes(self._key))
#~ self._path_cer = _save_temp(bytes(self._cer))
#~ except Exception as e:
#~ log.error(e)
#~ self._path_key = ''
#~ self._path_cer = ''
#~ return
def _kill(self, path):
try:
os.remove(path)

View File

@ -3479,6 +3479,9 @@ def authenticate(args):
obj = Usuarios.get(usuario=args['usuario'], es_activo=True)
except Usuarios.DoesNotExist:
return respuesta, None
except ProgrammingError as e:
log.error(e)
return respuesta, None
if not obj.contraseña.check_password(args['contra']):
return respuesta, None