Browse Source

May 06: [FIX] Bug Fixed 'user_login_alert'

pull/164/merge
RisvanaCybro 12 months ago
parent
commit
a3c59f27c7
  1. 2
      user_login_alert/__manifest__.py
  2. 7
      user_login_alert/controllers/main.py
  3. 5
      user_login_alert/doc/RELEASE_NOTES.md

2
user_login_alert/__manifest__.py

@ -22,7 +22,7 @@
'name': 'User Login Alert',
'summary': """Secure your Odoo account by alerts at right time. If any successful login to your
account happens, an alert mail will be send to you with the browser and IP details.""",
'version': '14.0.1.0.0',
'version': '14.0.1.0.1',
'description': """Secure your Odoo account by alerts at right time. If any successful login to your
account happens, an alert mail will be send to you with the browser and IP details, Odoo 13, Odoo13""",
'author': 'Cybrosys Techno Solutions',

7
user_login_alert/controllers/main.py

@ -35,7 +35,7 @@ from odoo import http
class Home(main.Home):
@http.route('/web/login', type='http', auth="public")
@http.route('/web/login', type='http', auth="none") #changed auth="public" to none
def web_login(self, redirect=None, **kw):
main.ensure_db()
request.params['login_success'] = False
@ -44,7 +44,6 @@ class Home(main.Home):
if not request.uid:
request.uid = odoo.SUPERUSER_ID
values = request.params.copy()
try:
values['databases'] = http.db_list()
@ -103,9 +102,7 @@ class Home(main.Home):
template_id = template_obj.create(template_data)
template_obj.send(template_id)
request.params['login_success'] = True
if not redirect:
redirect = '/web'
return http.redirect_with_hash(redirect)
return http.redirect_with_hash(self._login_redirect(uid, redirect=redirect))
request.uid = old_uid
values['error'] = _("Wrong login/password")
return request.render('web.login', values)

5
user_login_alert/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 14.0.1.0.0
#### ADD
Migration Of User Login Alert
#### 06.05.2024
#### Version 14.0.1.0.1
#### FIX
Fixed the issue of getting stuck at the login page when 2FA is enabled for the user.

Loading…
Cancel
Save