diff --git a/restrict_logins/README.rst b/restrict_logins/README.rst new file mode 100644 index 000000000..5cc5a48c2 --- /dev/null +++ b/restrict_logins/README.rst @@ -0,0 +1,51 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Restrict Concurrent User Login +============================== +This module ensures restricted concurrent sessions, enforces user force logout, and automates session expiry for enhanced security and user management. + +Configuration +============= +No additional configurations needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Lesser General Public License, Version 3 (LGPL v3) +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developers : (V13) Milind Mohan, + (V14) Aysha Shalin, + (V15) Aysha Shalin, + (V16) Jumana Jabin MK + (V17) Jumana Jabin MK + Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/restrict_logins/__init__.py b/restrict_logins/__init__.py new file mode 100644 index 000000000..66ef8cc56 --- /dev/null +++ b/restrict_logins/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import controllers +from . import models diff --git a/restrict_logins/__manifest__.py b/restrict_logins/__manifest__.py new file mode 100644 index 000000000..53c1edc16 --- /dev/null +++ b/restrict_logins/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': 'Restrict Concurrent User Login', + 'version': '17.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """Ensures restricted concurrent sessions, enforces user force + logout, and automates session expiry for enhanced security.""", + 'description': """This module ensures security by restricting concurrent + user sessions and provides the option for forced logout. It includes + automatic session expiry after a set duration, managing user logins + efficiently.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'data': [ + 'data/ir_cron_data.xml', + 'views/res_users_views.xml', + 'views/login_clear_session_template.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/restrict_logins/controllers/__init__.py b/restrict_logins/controllers/__init__.py new file mode 100644 index 000000000..5091876e0 --- /dev/null +++ b/restrict_logins/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import home +from . import session diff --git a/restrict_logins/controllers/home.py b/restrict_logins/controllers/home.py new file mode 100644 index 000000000..b95398849 --- /dev/null +++ b/restrict_logins/controllers/home.py @@ -0,0 +1,100 @@ +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo.addons.web.controllers.home import Home as WebHome +from odoo.addons.web.controllers.utils import ensure_db +import odoo +import odoo.modules.registry +from odoo import SUPERUSER_ID +from odoo import http +from odoo.http import request +from odoo.tools.translate import _ + +# Shared parameters for all login/signup flows +SIGN_UP_REQUEST_PARAMS = {'db', 'login', 'debug', 'token', 'message', 'error', 'scope', 'mode', + 'redirect', 'redirect_hostname', 'email', 'name', 'partner_id', + 'password', 'confirm_password', 'city', 'country_id', 'lang', 'signup_email'} + + +class Home(WebHome): + """ This class includes methods related to user authentication and login.""" + + @http.route('/web/login', type='http', auth="none") + def web_login(self, redirect=None, **kw): + ensure_db() + request.params['login_success'] = False + if request.httprequest.method == 'GET' and redirect and request.session.uid: + return request.redirect(redirect) + + # simulate hybrid auth=user/auth=public, despite using auth=none to be able + # to redirect users when no db is selected - cfr ensure_db() + if request.env.uid is None: + if request.session.uid is None: + # no user -> auth=public with specific website public user + request.env["ir.http"]._auth_method_public() + else: + # auth=user + request.update_env(user=request.session.uid) + + values = {k: v for k, v in request.params.items() if k in SIGN_UP_REQUEST_PARAMS} + try: + values['databases'] = http.db_list() + except odoo.exceptions.AccessDenied: + values['databases'] = None + + if request.httprequest.method == 'POST': + old_uid = request.uid + try: + uid = request.session.authenticate(request.db, + request.params['login'], + request.params['password']) + request.params['login_success'] = True + return request.redirect( + self._login_redirect(uid, redirect=redirect)) + except odoo.exceptions.AccessDenied as e: + failed_uid = request.env.uid + request.env.uid = old_uid + if e.args == odoo.exceptions.AccessDenied().args: + values['error'] = _("Wrong login/password") + # already logged_in user exception + elif e.args[0] == "already_logged_in": + values['error'] = "User already logged in. Log out from " \ + "other devices and try again." + values['logout_all'] = True + values['failed_uid'] = failed_uid if ( + failed_uid != SUPERUSER_ID) else False + else: + values['error'] = e.args[0] + else: + if 'error' in request.params and request.params.get( + 'error') == 'access': + values['error'] = _( + 'Only employees can access this database. Please contact the administrator.') + + if 'login' not in values and request.session.get('auth_login'): + values['login'] = request.session.get('auth_login') + + if not odoo.tools.config['list_db']: + values['disable_database_manager'] = True + + response = request.render('web.login', values) + response.headers['X-Frame-Options'] = 'SAMEORIGIN' + response.headers['Content-Security-Policy'] = "frame-ancestors 'self'" + return response diff --git a/restrict_logins/controllers/session.py b/restrict_logins/controllers/session.py new file mode 100644 index 000000000..790b98b0b --- /dev/null +++ b/restrict_logins/controllers/session.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +import os +from odoo.addons.web.controllers.session import Session as WebSession +import odoo +import odoo.modules.registry +from odoo import http +from odoo.http import request +from odoo.tools._vendor import sessions + +# Shared parameters for all login/signup flows +SIGN_UP_REQUEST_PARAMS = {'db', 'login', 'debug', 'token', 'message', 'error', 'scope', 'mode', + 'redirect', 'redirect_hostname', 'email', 'name', 'partner_id', + 'password', 'confirm_password', 'city', 'country_id', 'lang', 'signup_email'} +LOGIN_SUCCESSFUL_PARAMS = set() + + +def clear_session_history(u_sid, f_uid=False): + """ Clear all the user session histories of a particular user """ + path = odoo.tools.config.session_dir + store = odoo.http.FilesystemSessionStore( + path, session_class=odoo.http.Session, renew_missing=True) + session_path = store.get_session_filename(u_sid) + try: + os.remove(session_path) + return True + except OSError as e: + pass + return False + + +def super_clear_all(): + """ Clear all the user session histories """ + path = odoo.tools.config.session_dir + store = sessions.FilesystemSessionStore( + path, session_class=odoo.http.Session, renew_missing=True) + for fname in os.listdir(store.path): + path = os.path.join(store.path, fname) + try: + os.unlink(path) + except OSError: + pass + return True + + +class Session(WebSession): + """ + This class includes methods to handle user logouts, clear individual user + sessions, and perform a force logout, which logs out from all devices. + """ + @http.route('/web/session/logout', type='http', auth="none") + def logout(self, redirect='/web'): + """ Logs out the current user by clearing their session. """ + user = request.env['res.users'].with_user(1).search( + [('id', '=', request.session.uid)]) + user._clear_session() # Clear user session + request.session.logout(keep_db=True) + return request.redirect(redirect, 303) + + @http.route('/clear_all_sessions', type='http', auth="none") + def logout_all(self, redirect='/web', f_uid=False): + """ Log out from all the sessions of the current user """ + if f_uid: + user = request.env['res.users'].with_user(1).browse(int(f_uid)) + if user: + # Clear session file for the user + session_cleared = clear_session_history(user.sid, f_uid) + if session_cleared: + # Clear user session + user._clear_session() + request.session.logout(keep_db=True) + return request.redirect(redirect, 303) + + @http.route('/super/logout_all', type='http', auth="none") + def super_logout_all(self, redirect='/web'): + """ Log out from all the sessions of all users. """ + users = request.env['res.users'].with_user(1).search([]) + for user in users: + # Clear session file for the user + session_cleared = super_clear_all() + if session_cleared: + user._clear_session() # Clear user session + request.session.logout(keep_db=True) + return request.redirect(redirect, 303) diff --git a/restrict_logins/data/ir_cron_data.xml b/restrict_logins/data/ir_cron_data.xml new file mode 100644 index 000000000..dbe858ba9 --- /dev/null +++ b/restrict_logins/data/ir_cron_data.xml @@ -0,0 +1,17 @@ + + + + + + User: Validate User Sessions + + code + model._validate_sessions() + 1 + minutes + -1 + + + + + diff --git a/restrict_logins/doc/RELEASE_NOTES.md b/restrict_logins/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..6be6ae45f --- /dev/null +++ b/restrict_logins/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 08.08.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial Commit for Restrict Concurrent User Login diff --git a/restrict_logins/models/__init__.py b/restrict_logins/models/__init__.py new file mode 100644 index 000000000..d26e73042 --- /dev/null +++ b/restrict_logins/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import ir_http +from . import res_users + diff --git a/restrict_logins/models/ir_http.py b/restrict_logins/models/ir_http.py new file mode 100644 index 000000000..277c622c3 --- /dev/null +++ b/restrict_logins/models/ir_http.py @@ -0,0 +1,101 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +import logging +from datetime import datetime, timedelta +import werkzeug +import werkzeug.exceptions +import werkzeug.routing +from odoo import api, http, models, SUPERUSER_ID +from odoo.exceptions import AccessDenied +from odoo.http import request +from odoo.service import security + +_logger = logging.getLogger(__name__) + + +class IrHttp(models.AbstractModel): + """ Extends the Odoo abstract model 'ir.http' for custom HTTP handling.""" + _inherit = 'ir.http' + + @classmethod + def _authenticate(cls, endpoint): + """ This method updates user session details, checks for session + mismatches and performs necessary updates.""" + auth_method = 'none' if http.is_cors_preflight(request, endpoint) else endpoint.routing['auth'] + try: + if request.session.uid: + uid = request.session.uid + user_pool = request.env['res.users'].with_user( + SUPERUSER_ID).browse(uid) + + # updating session details + def _update_user(u_sid, u_now, u_exp_date, u_uid): + """ Function for updating session details for the + corresponding user.""" + if u_uid and u_exp_date and u_sid and u_now: + query = """update res_users set sid = '%s', + last_update = '%s',exp_date = '%s', + logged_in = 'TRUE' where id = %s + """ % (u_sid, u_now, u_exp_date, u_uid) + execute = request.env.cr.execute(query) + + sid = request.session.sid + last_update = user_pool.last_update + now = datetime.now() + exp_date = datetime.now() + timedelta(minutes=45) + # Check that the authentication contains bus_inactivity + # request_params = request.params.copy() + # if 'options' in request_params and 'bus_inactivity' in \ + # request_params['options']: + # Update session if there is sid mismatch + if uid and user_pool.sid and sid != user_pool.sid: + _update_user(sid, now, exp_date, uid) + else: + # Update if there is no session data and user is active + if not user_pool.last_update and not user_pool.sid and \ + not user_pool.logged_in: + _update_user(sid, now, exp_date, uid) + # Update sid and date if last update is above 0.5 min + if last_update: + update_diff = (datetime.now() - + last_update).total_seconds() / 60.0 + if uid and (update_diff > 0.5 or sid != user_pool.sid): + _update_user(sid, now, exp_date, uid) + except Exception as e: + _logger.info( + "Exception during updating user session...%s", e) + pass + try: + if request.session.uid is not None: + if not security.check_session(request.session, request.env): + request.session.logout(keep_db=True) + request.env = api.Environment(request.env.cr, None, + request.session.context) + getattr(cls, "_auth_method_%s" % auth_method)() + except (AccessDenied, http.SessionExpiredException, + werkzeug.exceptions.HTTPException): + raise + except Exception: + _logger.info("Exception during request Authentication.", + exc_info=True) + raise AccessDenied() + return auth_method diff --git a/restrict_logins/models/res_users.py b/restrict_logins/models/res_users.py new file mode 100644 index 000000000..e0a0a78c8 --- /dev/null +++ b/restrict_logins/models/res_users.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +import logging +from datetime import datetime, timedelta +import pytz +from odoo import SUPERUSER_ID +from odoo import api, fields, models +from odoo.exceptions import AccessDenied +from odoo.http import request +from ..controllers.session import clear_session_history + +_logger = logging.getLogger(__name__) + + +class ResUsers(models.Model): + """ Inheriting 'res.users' for adding fields related session.""" + _inherit = 'res.users' + + sid = fields.Char(string='Session ID', help="ID of session") + exp_date = fields.Datetime(string='Current Session Expiration', + help="Time of expiring of current session") + logged_in = fields.Boolean(string='Logged In', + help="User is currently logged in") + last_update = fields.Datetime(string="Last Connection", + help="Last log in") + + @classmethod + def _login(cls, db, login, password, user_agent_env): + """ + Handles user login authentication. + Notify user if they are already logged in and attempt to log in from + other device. + """ + if not password: + raise AccessDenied() + ip = request.httprequest.environ['REMOTE_ADDR'] if request else 'n/a' + try: + with cls.pool.cursor() as cr: + self = api.Environment(cr, SUPERUSER_ID, {})[cls._name] + with self._assert_can_auth(user=login): + user = self.search(self._get_login_domain(login), + order=self._get_login_order(), limit=1) + if not user: + raise AccessDenied() + user = user.with_user(user) + user._check_credentials(password, user_agent_env) + tz = request.httprequest.cookies.get( + 'tz') if request else None + if tz in pytz.all_timezones and ( + not user.tz or not user.login_date): + user.tz = tz + # Check sid and exp date + if user.exp_date and user.sid and user.logged_in: + _logger.warning("User %s is already logged in " + "into the system!. Multiple " + "sessions are not allowed for " + "security reasons!" % user.name) + request.env.uid = user.id + raise AccessDenied("already_logged_in") + # Save user session detail if login is successful + user._save_session() + user._update_last_login() + except AccessDenied: + _logger.info("Login failed for db:%s login:%s from %s", db, login, + ip) + raise + _logger.info("Login successful for db:%s login:%s from %s", db, login, + ip) + return user.id + + def _clear_session(self): + """ Function for clearing the session details of user.""" + self.write({ + 'sid': False, + 'exp_date': False, + 'logged_in': False, + 'last_update': datetime.now() + }) + + def _save_session(self): + """ Function for saving session details of the corresponding user.""" + exp_date = datetime.utcnow() + timedelta(minutes=45) + sid = request.session.sid + self.with_user(SUPERUSER_ID).write({ + 'sid': sid, + 'exp_date': exp_date, + 'logged_in': True, + 'last_update': datetime.now() + }) + + def _validate_sessions(self): + """ Function for validating user sessions.""" + users = self.search([('exp_date', '!=', False)]) + for user in users: + if user.exp_date < datetime.utcnow(): + # Clear session file for the user + session_cleared = clear_session_history(user.sid) + if session_cleared: + user._clear_session() # Clear user session + _logger.info("Cron _validate_session: " + "cleared session user: %s" % (user.name)) + else: + _logger.info("Cron _validate_session: failed to " + "clear session user: %s" % (user.name)) diff --git a/restrict_logins/static/description/assets/icons/capture (1).png b/restrict_logins/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/restrict_logins/static/description/assets/icons/capture (1).png differ diff --git a/restrict_logins/static/description/assets/icons/check.png b/restrict_logins/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/restrict_logins/static/description/assets/icons/check.png differ diff --git a/restrict_logins/static/description/assets/icons/chevron.png b/restrict_logins/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/restrict_logins/static/description/assets/icons/chevron.png differ diff --git a/restrict_logins/static/description/assets/icons/cogs.png b/restrict_logins/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/restrict_logins/static/description/assets/icons/cogs.png differ diff --git a/restrict_logins/static/description/assets/icons/consultation.png b/restrict_logins/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/restrict_logins/static/description/assets/icons/consultation.png differ diff --git a/restrict_logins/static/description/assets/icons/ecom-black.png b/restrict_logins/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/restrict_logins/static/description/assets/icons/ecom-black.png differ diff --git a/restrict_logins/static/description/assets/icons/education-black.png b/restrict_logins/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/restrict_logins/static/description/assets/icons/education-black.png differ diff --git a/restrict_logins/static/description/assets/icons/hotel-black.png b/restrict_logins/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/restrict_logins/static/description/assets/icons/hotel-black.png differ diff --git a/restrict_logins/static/description/assets/icons/img.png b/restrict_logins/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/restrict_logins/static/description/assets/icons/img.png differ diff --git a/restrict_logins/static/description/assets/icons/license.png b/restrict_logins/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/restrict_logins/static/description/assets/icons/license.png differ diff --git a/restrict_logins/static/description/assets/icons/lifebuoy.png b/restrict_logins/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/restrict_logins/static/description/assets/icons/lifebuoy.png differ diff --git a/restrict_logins/static/description/assets/icons/manufacturing-black.png b/restrict_logins/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/restrict_logins/static/description/assets/icons/manufacturing-black.png differ diff --git a/restrict_logins/static/description/assets/icons/photo-capture.png b/restrict_logins/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/restrict_logins/static/description/assets/icons/photo-capture.png differ diff --git a/restrict_logins/static/description/assets/icons/pos-black.png b/restrict_logins/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/restrict_logins/static/description/assets/icons/pos-black.png differ diff --git a/restrict_logins/static/description/assets/icons/puzzle.png b/restrict_logins/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/restrict_logins/static/description/assets/icons/puzzle.png differ diff --git a/restrict_logins/static/description/assets/icons/restaurant-black.png b/restrict_logins/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/restrict_logins/static/description/assets/icons/restaurant-black.png differ diff --git a/restrict_logins/static/description/assets/icons/service-black.png b/restrict_logins/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/restrict_logins/static/description/assets/icons/service-black.png differ diff --git a/restrict_logins/static/description/assets/icons/trading-black.png b/restrict_logins/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/restrict_logins/static/description/assets/icons/trading-black.png differ diff --git a/restrict_logins/static/description/assets/icons/training.png b/restrict_logins/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/restrict_logins/static/description/assets/icons/training.png differ diff --git a/restrict_logins/static/description/assets/icons/update.png b/restrict_logins/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/restrict_logins/static/description/assets/icons/update.png differ diff --git a/restrict_logins/static/description/assets/icons/user.png b/restrict_logins/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/restrict_logins/static/description/assets/icons/user.png differ diff --git a/restrict_logins/static/description/assets/icons/wrench.png b/restrict_logins/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/restrict_logins/static/description/assets/icons/wrench.png differ diff --git a/restrict_logins/static/description/assets/misc/Cybrosys R.png b/restrict_logins/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/restrict_logins/static/description/assets/misc/Cybrosys R.png differ diff --git a/restrict_logins/static/description/assets/misc/email.svg b/restrict_logins/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/restrict_logins/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/restrict_logins/static/description/assets/misc/phone.svg b/restrict_logins/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/restrict_logins/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/restrict_logins/static/description/assets/misc/star (1) 2.svg b/restrict_logins/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/restrict_logins/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/restrict_logins/static/description/assets/misc/support (1) 1.svg b/restrict_logins/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/restrict_logins/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/restrict_logins/static/description/assets/misc/support-email.svg b/restrict_logins/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/restrict_logins/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/restrict_logins/static/description/assets/misc/tick-mark.svg b/restrict_logins/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/restrict_logins/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/restrict_logins/static/description/assets/misc/whatsapp 1.svg b/restrict_logins/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/restrict_logins/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/restrict_logins/static/description/assets/misc/whatsapp.svg b/restrict_logins/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/restrict_logins/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/restrict_logins/static/description/assets/modules/1.png b/restrict_logins/static/description/assets/modules/1.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/restrict_logins/static/description/assets/modules/1.png differ diff --git a/restrict_logins/static/description/assets/modules/2.png b/restrict_logins/static/description/assets/modules/2.png new file mode 100644 index 000000000..6dffe78cc Binary files /dev/null and b/restrict_logins/static/description/assets/modules/2.png differ diff --git a/restrict_logins/static/description/assets/modules/3.png b/restrict_logins/static/description/assets/modules/3.png new file mode 100644 index 000000000..998fe2c96 Binary files /dev/null and b/restrict_logins/static/description/assets/modules/3.png differ diff --git a/restrict_logins/static/description/assets/modules/4.png b/restrict_logins/static/description/assets/modules/4.png new file mode 100644 index 000000000..237d5d976 Binary files /dev/null and b/restrict_logins/static/description/assets/modules/4.png differ diff --git a/restrict_logins/static/description/assets/modules/5.png b/restrict_logins/static/description/assets/modules/5.png new file mode 100644 index 000000000..e1aa53f5c Binary files /dev/null and b/restrict_logins/static/description/assets/modules/5.png differ diff --git a/restrict_logins/static/description/assets/modules/6.jpg b/restrict_logins/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..0391a15ed Binary files /dev/null and b/restrict_logins/static/description/assets/modules/6.jpg differ diff --git a/restrict_logins/static/description/assets/screenshots/hero.gif b/restrict_logins/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..4a4ccfec0 Binary files /dev/null and b/restrict_logins/static/description/assets/screenshots/hero.gif differ diff --git a/restrict_logins/static/description/assets/screenshots/login_01.png b/restrict_logins/static/description/assets/screenshots/login_01.png new file mode 100644 index 000000000..8a63eb57b Binary files /dev/null and b/restrict_logins/static/description/assets/screenshots/login_01.png differ diff --git a/restrict_logins/static/description/assets/screenshots/login_02.png b/restrict_logins/static/description/assets/screenshots/login_02.png new file mode 100644 index 000000000..490ba2a8f Binary files /dev/null and b/restrict_logins/static/description/assets/screenshots/login_02.png differ diff --git a/restrict_logins/static/description/assets/screenshots/login_03.png b/restrict_logins/static/description/assets/screenshots/login_03.png new file mode 100644 index 000000000..4931be581 Binary files /dev/null and b/restrict_logins/static/description/assets/screenshots/login_03.png differ diff --git a/restrict_logins/static/description/banner.jpg b/restrict_logins/static/description/banner.jpg new file mode 100644 index 000000000..9c054e63e Binary files /dev/null and b/restrict_logins/static/description/banner.jpg differ diff --git a/restrict_logins/static/description/icon.png b/restrict_logins/static/description/icon.png new file mode 100644 index 000000000..6df557ea8 Binary files /dev/null and b/restrict_logins/static/description/icon.png differ diff --git a/restrict_logins/static/description/index.html b/restrict_logins/static/description/index.html new file mode 100644 index 000000000..426bb185e --- /dev/null +++ b/restrict_logins/static/description/index.html @@ -0,0 +1,715 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Restrict Concurrent User Login

+

+ Restrict Concurrent Sessions for Users +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Restrict Concurrent Sessions to enhance + security.

+
+
+
+
+
+
+ +
+
+

+ Option to log out from all logged in + devices.

+
+
+
+
+
+
+ +
+
+

+ Automatic Session Expiration After 45 + Minutes.

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ After installation, Log in to Odoo

+
+
+
+
+
+
+ +
+
+

+ When attempting to Log in, a notification + will appear if the + user is already logged in.

+
+
+
+
+
+
+ +
+
+

+ Enable the ability to force logout from + devices that are already + logged in.

+
+
+
+
+
+
+
    +
  • + Available in + Community and Enterprise +
  • +
  • + Restrict Concurrent Sessions for Users +
      +
    • Restrict Concurrent Sessions to enhance security. +
    • +
    +
  • +
  • + Force User Logout +
      +
    • Option to log out from all logged in devices. +
    • +
    +
  • +
  • + Automatic Session Expiration +
      +
    • Automatic Session Expiration After 45 Minutes. +
    • +
    +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:5th August 2024 +
+

+ Initial Commit for Restrict Concurrent User Login +

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in + touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi + to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/restrict_logins/views/login_clear_session_template.xml b/restrict_logins/views/login_clear_session_template.xml new file mode 100644 index 000000000..8d0334736 --- /dev/null +++ b/restrict_logins/views/login_clear_session_template.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/restrict_logins/views/res_users_views.xml b/restrict_logins/views/res_users_views.xml new file mode 100644 index 000000000..5184750a6 --- /dev/null +++ b/restrict_logins/views/res_users_views.xml @@ -0,0 +1,25 @@ + + + + + res.users.view.tree.inherit.restrict.logins + res.users + + + + Last Login + 1 + + + + + + + + + + + + + +