From a3c59f27c79ae969bd4273a18090ec09cc2a37fd Mon Sep 17 00:00:00 2001 From: RisvanaCybro Date: Mon, 6 May 2024 18:30:04 +0530 Subject: [PATCH] May 06: [FIX] Bug Fixed 'user_login_alert' --- user_login_alert/__manifest__.py | 2 +- user_login_alert/controllers/main.py | 7 ++----- user_login_alert/doc/RELEASE_NOTES.md | 5 +++++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/user_login_alert/__manifest__.py b/user_login_alert/__manifest__.py index 01cac51a3..ffd0a7b80 100644 --- a/user_login_alert/__manifest__.py +++ b/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', diff --git a/user_login_alert/controllers/main.py b/user_login_alert/controllers/main.py index 0fff4fa11..5398f9b49 100644 --- a/user_login_alert/controllers/main.py +++ b/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) diff --git a/user_login_alert/doc/RELEASE_NOTES.md b/user_login_alert/doc/RELEASE_NOTES.md index fc3228851..2ac1cc944 100644 --- a/user_login_alert/doc/RELEASE_NOTES.md +++ b/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.