Browse Source
Merge pull request #776 from Fenkiou/10-mig-auth_admin_passkey
Merge pull request #776 from Fenkiou/10-mig-auth_admin_passkey
[10.0][MIG] auth_admin_passkeypull/682/merge
Sylvain LE GAL
8 years ago
committed by
GitHub
39 changed files with 1830 additions and 580 deletions
-
98auth_admin_passkey/README.rst
-
27auth_admin_passkey/__init__.py
-
33auth_admin_passkey/__manifest__.py
-
22auth_admin_passkey/data/ir_config_parameter.xml
-
84auth_admin_passkey/i18n/ar.po
-
54auth_admin_passkey/i18n/auth_admin_passkey.pot
-
84auth_admin_passkey/i18n/ca.po
-
84auth_admin_passkey/i18n/da.po
-
45auth_admin_passkey/i18n/de.po
-
84auth_admin_passkey/i18n/el_GR.po
-
38auth_admin_passkey/i18n/es.po
-
84auth_admin_passkey/i18n/es_ES.po
-
84auth_admin_passkey/i18n/fi.po
-
32auth_admin_passkey/i18n/fr.po
-
84auth_admin_passkey/i18n/fr_CH.po
-
84auth_admin_passkey/i18n/hr.po
-
84auth_admin_passkey/i18n/hr_HR.po
-
85auth_admin_passkey/i18n/it.po
-
84auth_admin_passkey/i18n/nl.po
-
31auth_admin_passkey/i18n/pt_BR.po
-
34auth_admin_passkey/i18n/sl.po
-
93auth_admin_passkey/i18n/tr.po
-
84auth_admin_passkey/i18n/tr_TR.po
-
84auth_admin_passkey/i18n/zh_CN.po
-
24auth_admin_passkey/model/__init__.py
-
76auth_admin_passkey/model/res_config.py
-
137auth_admin_passkey/model/res_users.py
-
9auth_admin_passkey/models/__init__.py
-
58auth_admin_passkey/models/res_config.py
-
98auth_admin_passkey/models/res_users.py
-
26auth_admin_passkey/tests/__init__.py
-
128auth_admin_passkey/tests/test_auth_admin_passkey.py
-
171auth_admin_passkey/tests/test_ui.py
-
47auth_admin_passkey/view/res_config_view.xml
-
27auth_admin_passkey/views/res_config_view.xml
-
1setup/auth_admin_passkey/odoo/__init__.py
-
1setup/auth_admin_passkey/odoo/addons/__init__.py
-
1setup/auth_admin_passkey/odoo/addons/auth_admin_passkey
-
6setup/auth_admin_passkey/setup.py
@ -1,18 +1,80 @@ |
|||||
Admin password become a passkey for all active logins |
|
||||
===================================================== |
|
||||
|
|
||||
Functionality : |
|
||||
--------------- |
|
||||
* Administrator has now the possibility to login in with any login; |
|
||||
* By default, OpenERP will send a mail to user and admin to indicate them; |
|
||||
* If a user and the admin have the same password, admin will be informed; |
|
||||
|
|
||||
Technical information : |
|
||||
----------------------- |
|
||||
* Create two ir_config_parameter to enable / disable mail sending; |
|
||||
|
|
||||
Copyright, Author and Licence : |
|
||||
------------------------------- |
|
||||
* Copyright : 2014, Groupement Régional Alimentaire de Proximité; |
|
||||
* Author : Sylvain LE GAL (https://twitter.com/legalsylvain); |
|
||||
* Licence : AGPL-3 (http://www.gnu.org/licenses/) |
|
||||
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
|
||||
|
==================== |
||||
|
Auth Admin - Passkey |
||||
|
==================== |
||||
|
|
||||
|
This module extends the functionality of users module to support loging in with the administrator password |
||||
|
in other user accounts. |
||||
|
|
||||
|
* Administrator has now the possibility to login in with any login; |
||||
|
* By default, Odoo will send a mail to user and admin to indicate them; |
||||
|
* If a user and the admin have the same password, admin will be informed; |
||||
|
|
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
To enable notifications for login attempts, you need to: |
||||
|
|
||||
|
Go to Settings > General Settings. |
||||
|
|
||||
|
Enable the "Send email to admin user" and / or "Send email to user" checkbox |
||||
|
|
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
To login into a different user account type in the user name of the account and the password of the administrator at the login screen |
||||
|
|
||||
|
|
||||
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas |
||||
|
:alt: Try me on Runbot |
||||
|
:target: https://runbot.odoo-community.org/runbot/149/10.0 |
||||
|
|
||||
|
|
||||
|
Known issues / Roadmap |
||||
|
====================== |
||||
|
|
||||
|
None |
||||
|
|
||||
|
Bug Tracker |
||||
|
=========== |
||||
|
|
||||
|
Bugs are tracked on `GitHub Issues |
||||
|
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please |
||||
|
check there if your issue has already been reported. If you spotted it first, |
||||
|
help us smash it by providing detailed and welcomed feedback. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
|
||||
|
Images |
||||
|
------ |
||||
|
|
||||
|
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. |
||||
|
|
||||
|
Contributors |
||||
|
------------ |
||||
|
|
||||
|
* Eugen Don <eugen.don@don-systems.de> |
||||
|
* Alexandre Papin (https://twitter.com/Fenkiou) |
||||
|
* Sylvain LE GAL (https://twitter.com/legalsylvain) |
||||
|
|
||||
|
|
||||
|
Maintainer |
||||
|
---------- |
||||
|
|
||||
|
.. image:: https://odoo-community.org/logo.png |
||||
|
:alt: Odoo Community Association |
||||
|
:target: https://odoo-community.org |
||||
|
|
||||
|
This module is maintained by the OCA. |
||||
|
|
||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose |
||||
|
mission is to support the collaborative development of Odoo features and |
||||
|
promote its widespread use. |
||||
|
|
||||
|
To contribute to this module, please visit https://odoo-community.org. |
@ -1,23 +1,6 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Admin Passkey module for OpenERP |
|
||||
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
|
||||
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# 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 Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
||||
|
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html |
||||
|
|
||||
from . import model |
|
||||
|
from . import models |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-12 03:50+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-11 15:36+0000\n" |
||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n" |
||||
|
"Language-Team: Arabic (http://www.transifex.com/oca/OCA-server-tools-8-0/language/ar/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: ar\n" |
||||
|
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "المستخدمون" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-17 07:51+0000\n" |
||||
|
"PO-Revision-Date: 2015-09-18 13:53+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: Catalan (http://www.transifex.com/oca/OCA-server-tools-8-0/language/ca/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: ca\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Usuaris" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-03-18 02:08+0000\n" |
||||
|
"PO-Revision-Date: 2015-09-18 13:53+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: Danish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/da/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: da\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:66 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:38 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Brugere" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:64 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-12 03:50+0000\n" |
||||
|
"PO-Revision-Date: 2015-09-18 13:53+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: Greek (Greece) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/el_GR/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: el_GR\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Χρήστες" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-12 03:50+0000\n" |
||||
|
"PO-Revision-Date: 2015-09-18 13:53+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: Spanish (Spain) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/es_ES/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: es_ES\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Usuarios" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2016-04-14 07:01+0000\n" |
||||
|
"PO-Revision-Date: 2016-04-04 11:03+0000\n" |
||||
|
"Last-Translator: Jarmo Kortetjärvi <jarmo.kortetjarvi@gmail.com>\n" |
||||
|
"Language-Team: Finnish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/fi/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: fi\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/model/res_users.py:88 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/model/res_users.py:64 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/model/res_users.py:61 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Käyttäjät" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/model/res_users.py:86 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2016-11-30 14:52+0000\n" |
||||
|
"PO-Revision-Date: 2015-09-18 13:53+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: French (Switzerland) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/fr_CH/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: fr_CH\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Utilisateurs" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-12 03:50+0000\n" |
||||
|
"PO-Revision-Date: 2015-09-18 13:53+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: Croatian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/hr/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: hr\n" |
||||
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Korisnici" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-12 03:50+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-11 15:38+0000\n" |
||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n" |
||||
|
"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/hr_HR/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: hr_HR\n" |
||||
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Korisnici" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,85 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
# Paolo Valier, 2016 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2016-03-17 15:36+0000\n" |
||||
|
"PO-Revision-Date: 2016-03-13 08:47+0000\n" |
||||
|
"Last-Translator: Paolo Valier\n" |
||||
|
"Language-Team: Italian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/it/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: it\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/model/res_users.py:88 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/model/res_users.py:64 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/model/res_users.py:61 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "Invia email all'utente amministratore." |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "Invia email all'utente." |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Utenti" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/model/res_users.py:86 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-12 03:50+0000\n" |
||||
|
"PO-Revision-Date: 2015-09-18 13:53+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: Dutch (http://www.transifex.com/oca/OCA-server-tools-8-0/language/nl/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: nl\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Gebruikers" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,93 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
# Ahmet Altinisik <aaltinisik@altinkaya.com.tr>, 2016 |
||||
|
# Ahmet Altinisik <aaltinisik@altinkaya.com.tr>, 2016 |
||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013-2014 |
||||
|
# Giacomo <giacomo.spettoli@gmail.com>, 2015 |
||||
|
# Hotellook, 2014 |
||||
|
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015-2016 |
||||
|
# Miku Laitinen <miku.laitinen@gmail.com>, 2015 |
||||
|
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2015 |
||||
|
# Rudolf Schnapka <rs@techno-flex.de>, 2015-2016 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-03-02 09:58+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-11 15:35+0000\n" |
||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n" |
||||
|
"Language-Team: Turkish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/tr/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: tr\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:66 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "<pre> '%s' kullanıcısının şifresi sizinkiyle aynı.</pre>" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "Yönetici şifresini kullanarak '%s'. kullanıcısıyla giriş yaptı.\n\n\n\nTeknik detaylar aşağıda : \n\n- Giriş zamanı : %s\n\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "Parola" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:38 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "Kullanılan parola" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "Yöneticiye e-posta gönder." |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "Kullanıcıya e-posta gönder." |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Kullanıcılar" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "Yönetici farklı bir hesaba şifresiyle giriş yaparsa. Odoo hesap sahibine e-posta gönderecek." |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "Yönetici şifresiyle farklı bir kullanıcının hesabına giriş yaparsa, Odoo yöneticiye e-posta gönderir." |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:64 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "[UYARI] Odoo Güvenlik Riski" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2016-12-31 08:34+0000\n" |
||||
|
"PO-Revision-Date: 2015-09-18 13:53+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: Turkish (Turkey) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/tr_TR/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: tr_TR\n" |
||||
|
"Plural-Forms: nplurals=1; plural=0;\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "Kullanıcılar" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -0,0 +1,84 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * auth_admin_passkey |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: server-tools (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-12 03:50+0000\n" |
||||
|
"PO-Revision-Date: 2015-09-18 13:53+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/zh_CN/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: zh_CN\n" |
||||
|
"Plural-Forms: nplurals=1; plural=0;\n" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:69 |
||||
|
#, python-format |
||||
|
msgid "<pre>User with login '%s' has the same password as you.</pre>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:44 |
||||
|
#, python-format |
||||
|
msgid "" |
||||
|
"Admin user used his passkey to login with '%s'.\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"\n" |
||||
|
"Technicals informations belows : \n" |
||||
|
"\n" |
||||
|
"- Login date : %s\n" |
||||
|
"\n" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: view:base.config.settings:auth_admin_passkey.view_res_config_settings |
||||
|
msgid "Passkey" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:41 |
||||
|
#, python-format |
||||
|
msgid "Passkey used" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "Send email to admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: field:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "Send email to user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: model:ir.model,name:auth_admin_passkey.model_res_users |
||||
|
msgid "Users" |
||||
|
msgstr "用户" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_user:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the account user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: help:base.config.settings,auth_admin_passkey_send_to_admin:0 |
||||
|
msgid "" |
||||
|
"When the administrator use his password to login in with a different " |
||||
|
"account, Odoo will send an email to the admin user." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: auth_admin_passkey |
||||
|
#: code:addons/auth_admin_passkey/models/res_users.py:67 |
||||
|
#, python-format |
||||
|
msgid "[WARNING] Odoo Security Risk" |
||||
|
msgstr "" |
@ -1,24 +0,0 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Admin Passkey module for OpenERP |
|
||||
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
|
||||
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# 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 Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
|
||||
from . import res_config |
|
||||
from . import res_users |
|
@ -1,76 +0,0 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Admin Passkey module for OpenERP |
|
||||
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
|
||||
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# 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 Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
|
||||
from openerp.osv import fields |
|
||||
from openerp.osv.orm import TransientModel |
|
||||
from openerp.tools.safe_eval import safe_eval |
|
||||
|
|
||||
|
|
||||
class base_config_settings(TransientModel): |
|
||||
_inherit = 'base.config.settings' |
|
||||
|
|
||||
# Getter / Setter Section |
|
||||
def get_default_auth_admin_passkey_send_to_admin( |
|
||||
self, cr, uid, ids, context=None): |
|
||||
icp = self.pool['ir.config_parameter'] |
|
||||
return { |
|
||||
'auth_admin_passkey_send_to_admin': safe_eval(icp.get_param( |
|
||||
cr, uid, 'auth_admin_passkey.send_to_admin', 'True')), |
|
||||
} |
|
||||
|
|
||||
def set_auth_admin_passkey_send_to_admin(self, cr, uid, ids, context=None): |
|
||||
config = self.browse(cr, uid, ids[0], context=context) |
|
||||
icp = self.pool['ir.config_parameter'] |
|
||||
icp.set_param( |
|
||||
cr, uid, 'auth_admin_passkey.send_to_admin', |
|
||||
repr(config.auth_admin_passkey_send_to_admin)) |
|
||||
|
|
||||
def get_default_auth_admin_passkey_send_to_user( |
|
||||
self, cr, uid, ids, context=None): |
|
||||
icp = self.pool['ir.config_parameter'] |
|
||||
return { |
|
||||
'auth_admin_passkey_send_to_user': safe_eval(icp.get_param( |
|
||||
cr, uid, 'auth_admin_passkey.send_to_user', 'True')), |
|
||||
} |
|
||||
|
|
||||
def set_auth_admin_passkey_send_to_user(self, cr, uid, ids, context=None): |
|
||||
config = self.browse(cr, uid, ids[0], context=context) |
|
||||
icp = self.pool['ir.config_parameter'] |
|
||||
icp.set_param( |
|
||||
cr, uid, 'auth_admin_passkey.send_to_user', |
|
||||
repr(config.auth_admin_passkey_send_to_user)) |
|
||||
|
|
||||
# Columns Section |
|
||||
_columns = { |
|
||||
'auth_admin_passkey_send_to_admin': fields.boolean( |
|
||||
'Send email to admin user.', |
|
||||
help="""When the administrator use his password to login in """ |
|
||||
"""with a different account, OpenERP will send an email """ |
|
||||
"""to the admin user.""", |
|
||||
), |
|
||||
'auth_admin_passkey_send_to_user': fields.boolean( |
|
||||
string='Send email to user.', |
|
||||
help="""When the administrator use his password to login in """ |
|
||||
"""with a different account, OpenERP will send an email """ |
|
||||
"""to the account user.""", |
|
||||
), |
|
||||
} |
|
@ -1,137 +0,0 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Admin Passkey module for OpenERP |
|
||||
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
|
||||
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# 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 Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
|
||||
import datetime |
|
||||
|
|
||||
from openerp import SUPERUSER_ID |
|
||||
from openerp import pooler |
|
||||
from openerp import exceptions |
|
||||
from openerp.osv.orm import Model |
|
||||
from openerp.tools.translate import _ |
|
||||
from openerp.tools.safe_eval import safe_eval |
|
||||
|
|
||||
|
|
||||
class res_users(Model): |
|
||||
_inherit = "res.users" |
|
||||
|
|
||||
# Private Function section |
|
||||
def _get_translation(self, cr, lang, text): |
|
||||
context = {'lang': lang} # noqa: _() checks page for locals |
|
||||
return _(text) |
|
||||
|
|
||||
def _send_email_passkey(self, cr, user_id, user_agent_env): |
|
||||
""" Send a email to the admin of the system and / or the user |
|
||||
to inform passkey use.""" |
|
||||
mails = [] |
|
||||
mail_obj = self.pool['mail.mail'] |
|
||||
icp_obj = self.pool['ir.config_parameter'] |
|
||||
admin_user = self.browse(cr, SUPERUSER_ID, SUPERUSER_ID) |
|
||||
login_user = self.browse(cr, SUPERUSER_ID, user_id) |
|
||||
send_to_admin = safe_eval(icp_obj.get_param( |
|
||||
cr, SUPERUSER_ID, 'auth_admin_passkey.send_to_admin', 'True')) |
|
||||
send_to_user = safe_eval(icp_obj.get_param( |
|
||||
cr, SUPERUSER_ID, 'auth_admin_passkey.send_to_user', 'True')) |
|
||||
|
|
||||
if send_to_admin and admin_user.email: |
|
||||
mails.append({'email': admin_user.email, 'lang': admin_user.lang}) |
|
||||
if send_to_user and login_user.email: |
|
||||
mails.append({'email': login_user.email, 'lang': login_user.lang}) |
|
||||
|
|
||||
for mail in mails: |
|
||||
subject = self._get_translation( |
|
||||
cr, mail['lang'], _('Passkey used')) |
|
||||
body = self._get_translation( |
|
||||
cr, mail['lang'], |
|
||||
_("""Admin user used his passkey to login with '%s'.\n\n""" |
|
||||
"""\n\nTechnicals informations belows : \n\n""" |
|
||||
"""- Login date : %s\n\n""")) % ( |
|
||||
login_user.login, |
|
||||
datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) |
|
||||
for k, v in user_agent_env.iteritems(): |
|
||||
body += ("- %s : %s\n\n") % (k, v) |
|
||||
mail_obj.create( |
|
||||
cr, SUPERUSER_ID, { |
|
||||
'email_to': mail['email'], |
|
||||
'subject': subject, |
|
||||
'body_html': '<pre>%s</pre>' % body}) |
|
||||
|
|
||||
def _send_email_same_password(self, cr, login_user): |
|
||||
""" Send a email to the admin user to inform that another user has the |
|
||||
same password as him.""" |
|
||||
mail_obj = self.pool['mail.mail'] |
|
||||
admin_user = self.browse(cr, SUPERUSER_ID, SUPERUSER_ID) |
|
||||
if admin_user.email: |
|
||||
mail_obj.create(cr, SUPERUSER_ID, { |
|
||||
'email_to': admin_user.email, |
|
||||
'subject': self._get_translation( |
|
||||
cr, admin_user.lang, _('[WARNING] OpenERP Security Risk')), |
|
||||
'body_html': self._get_translation( |
|
||||
cr, admin_user.lang, _( |
|
||||
"""<pre>User with login '%s' has the same """ |
|
||||
"""password as you.</pre>""")) % (login_user), |
|
||||
}) |
|
||||
|
|
||||
# Overload Section |
|
||||
def authenticate(self, db, login, password, user_agent_env): |
|
||||
""" Authenticate the user 'login' is password is ok or if |
|
||||
is admin password. In the second case, send mail to user and admin.""" |
|
||||
user_id = super(res_users, self).authenticate( |
|
||||
db, login, password, user_agent_env) |
|
||||
if user_id and (user_id != SUPERUSER_ID): |
|
||||
same_password = False |
|
||||
cr = pooler.get_db(db).cursor() |
|
||||
try: |
|
||||
# directly use parent 'check_credentials' function |
|
||||
# to really know if credentials are ok |
|
||||
# or if it was admin password |
|
||||
super(res_users, self).check_credentials( |
|
||||
cr, SUPERUSER_ID, password) |
|
||||
try: |
|
||||
# Test now if the user has the same password as admin user |
|
||||
super(res_users, self).check_credentials( |
|
||||
cr, user_id, password) |
|
||||
same_password = True |
|
||||
except exceptions.AccessDenied: |
|
||||
pass |
|
||||
if not same_password: |
|
||||
self._send_email_passkey(cr, user_id, user_agent_env) |
|
||||
else: |
|
||||
self._send_email_same_password(cr, login) |
|
||||
cr.commit() |
|
||||
except exceptions.AccessDenied: |
|
||||
pass |
|
||||
finally: |
|
||||
cr.close() |
|
||||
return user_id |
|
||||
|
|
||||
def check_credentials(self, cr, uid, password): |
|
||||
""" Return now True if credentials are good OR if password is admin |
|
||||
password.""" |
|
||||
if uid != SUPERUSER_ID: |
|
||||
try: |
|
||||
super(res_users, self).check_credentials( |
|
||||
cr, uid, password) |
|
||||
return True |
|
||||
except exceptions.AccessDenied: |
|
||||
return self.check_credentials(cr, SUPERUSER_ID, password) |
|
||||
else: |
|
||||
return super(res_users, self).check_credentials(cr, uid, password) |
|
@ -0,0 +1,9 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
||||
|
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html |
||||
|
|
||||
|
from . import ( |
||||
|
res_config, |
||||
|
res_users, |
||||
|
) |
@ -0,0 +1,58 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
||||
|
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html |
||||
|
|
||||
|
from odoo import api, fields, models |
||||
|
from odoo.tools import safe_eval |
||||
|
|
||||
|
|
||||
|
class BaseConfigSettings(models.TransientModel): |
||||
|
_inherit = 'base.config.settings' |
||||
|
|
||||
|
@api.model |
||||
|
def get_default_auth_admin_passkey_send_to_admin(self, fields): |
||||
|
icp = self.env['ir.config_parameter'] |
||||
|
return { |
||||
|
'auth_admin_passkey_send_to_admin': safe_eval(icp.get_param( |
||||
|
'auth_admin_passkey.send_to_admin', 'True')), |
||||
|
} |
||||
|
|
||||
|
@api.model |
||||
|
def get_default_auth_admin_passkey_send_to_user(self, fields): |
||||
|
icp = self.env['ir.config_parameter'] |
||||
|
return { |
||||
|
'auth_admin_passkey_send_to_user': safe_eval(icp.get_param( |
||||
|
'auth_admin_passkey.send_to_user', 'True')), |
||||
|
} |
||||
|
|
||||
|
auth_admin_passkey_send_to_admin = fields.Boolean( |
||||
|
'Send email to admin user.', |
||||
|
help=('When the administrator use his password to login in ' |
||||
|
'with a different account, Odoo will send an email ' |
||||
|
'to the admin user.'), |
||||
|
) |
||||
|
auth_admin_passkey_send_to_user = fields.Boolean( |
||||
|
string='Send email to user.', |
||||
|
help=('When the administrator use his password to login in ' |
||||
|
'with a different account, Odoo will send an email ' |
||||
|
'to the account user.'), |
||||
|
) |
||||
|
|
||||
|
@api.multi |
||||
|
def set_auth_admin_passkey_send_to_admin(self): |
||||
|
self.ensure_one() |
||||
|
|
||||
|
icp = self.env['ir.config_parameter'] |
||||
|
icp.set_param( |
||||
|
'auth_admin_passkey.send_to_admin', |
||||
|
repr(self.auth_admin_passkey_send_to_admin)) |
||||
|
|
||||
|
@api.multi |
||||
|
def set_auth_admin_passkey_send_to_user(self): |
||||
|
self.ensure_one() |
||||
|
|
||||
|
icp = self.env['ir.config_parameter'] |
||||
|
icp.set_param( |
||||
|
'auth_admin_passkey.send_to_user', |
||||
|
repr(self.auth_admin_passkey_send_to_user)) |
@ -0,0 +1,98 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
||||
|
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html |
||||
|
|
||||
|
import datetime |
||||
|
|
||||
|
from odoo import SUPERUSER_ID, _, api, exceptions, models |
||||
|
from odoo.tools.safe_eval import safe_eval |
||||
|
|
||||
|
|
||||
|
class ResUsers(models.Model): |
||||
|
_inherit = "res.users" |
||||
|
|
||||
|
@api.model |
||||
|
def _send_email_passkey(self, user_id): |
||||
|
""" Send a email to the admin of the system and / or the user |
||||
|
to inform passkey use.""" |
||||
|
mail_obj = self.env['mail.mail'].sudo() |
||||
|
icp_obj = self.env['ir.config_parameter'] |
||||
|
|
||||
|
admin_user = self.browse(SUPERUSER_ID) |
||||
|
login_user = self.browse(user_id) |
||||
|
|
||||
|
send_to_admin = safe_eval( |
||||
|
icp_obj.get_param('auth_admin_passkey.send_to_admin') |
||||
|
) |
||||
|
send_to_user = safe_eval( |
||||
|
icp_obj.get_param('auth_admin_passkey.send_to_user') |
||||
|
) |
||||
|
|
||||
|
mails = [] |
||||
|
if send_to_admin and admin_user.email: |
||||
|
mails.append({'email': admin_user.email, 'lang': admin_user.lang}) |
||||
|
if send_to_user and login_user.email: |
||||
|
mails.append({'email': login_user.email, 'lang': login_user.lang}) |
||||
|
for mail in mails: |
||||
|
subject = _('Passkey used') |
||||
|
body = _( |
||||
|
"Admin user used his passkey to login with '%s'.\n\n" |
||||
|
"\n\nTechnicals informations belows : \n\n" |
||||
|
"- Login date : %s\n\n" |
||||
|
) % (login_user.login, |
||||
|
datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) |
||||
|
|
||||
|
mail_obj.create({ |
||||
|
'email_to': mail['email'], |
||||
|
'subject': subject, |
||||
|
'body_html': '<pre>%s</pre>' % body |
||||
|
}) |
||||
|
|
||||
|
@api.model |
||||
|
def _send_email_same_password(self, login): |
||||
|
""" Send an email to the admin user to inform that |
||||
|
another user has the same password as him.""" |
||||
|
mail_obj = self.env['mail.mail'].sudo() |
||||
|
admin_user = self.browse(SUPERUSER_ID) |
||||
|
|
||||
|
if admin_user.email: |
||||
|
mail_obj.create({ |
||||
|
'email_to': admin_user.email, |
||||
|
'subject': _('[WARNING] Odoo Security Risk'), |
||||
|
'body_html': |
||||
|
_("<pre>User with login '%s' has the same " |
||||
|
"password as you.</pre>") % (login), |
||||
|
}) |
||||
|
|
||||
|
@api.model |
||||
|
def check_credentials(self, password): |
||||
|
""" Despite using @api.model decorator, this method |
||||
|
is always called by a res.users record""" |
||||
|
try: |
||||
|
super(ResUsers, self).check_credentials(password) |
||||
|
|
||||
|
# If credentials are ok, try to log with user password as admin |
||||
|
# user and send email if they are equal |
||||
|
if self._uid != SUPERUSER_ID: |
||||
|
try: |
||||
|
super(ResUsers, self).sudo().check_credentials(password) |
||||
|
self._send_email_same_password(self.login) |
||||
|
except exceptions.AccessDenied: |
||||
|
pass |
||||
|
|
||||
|
except exceptions.AccessDenied: |
||||
|
if self._uid == SUPERUSER_ID: |
||||
|
raise |
||||
|
|
||||
|
# Just be sure that parent methods aren't wrong |
||||
|
user = self.sudo().search([('id', '=', self._uid)]) |
||||
|
if not user: |
||||
|
raise |
||||
|
|
||||
|
# Our user isn't using its own password, check if its admin one |
||||
|
try: |
||||
|
super(ResUsers, self).sudo().check_credentials(password) |
||||
|
self._send_email_passkey(self._uid) |
||||
|
except exceptions.AccessDenied: |
||||
|
raise |
@ -1,23 +1,7 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Admin Passkey module for OpenERP |
|
||||
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
|
||||
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# 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 Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
||||
|
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html |
||||
|
|
||||
from . import test_auth_admin_passkey |
from . import test_auth_admin_passkey |
||||
|
from . import test_ui |
@ -1,99 +1,61 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Admin Passkey module for OpenERP |
|
||||
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
|
||||
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# 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 Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
||||
|
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html |
||||
|
|
||||
import threading |
|
||||
|
from odoo import SUPERUSER_ID, exceptions |
||||
|
from odoo.tests import common |
||||
|
|
||||
from openerp.tests.common import TransactionCase |
|
||||
|
|
||||
|
|
||||
class TestAuthAdminPasskey(TransactionCase): |
|
||||
|
@common.post_install(True) |
||||
|
class TestAuthAdminPasskey(common.TransactionCase): |
||||
"""Tests for 'Auth Admin Passkey' Module""" |
"""Tests for 'Auth Admin Passkey' Module""" |
||||
|
|
||||
# Overload Section |
|
||||
def setUp(self): |
def setUp(self): |
||||
super(TestAuthAdminPasskey, self).setUp() |
super(TestAuthAdminPasskey, self).setUp() |
||||
|
|
||||
# Get Registries |
|
||||
self.imd_obj = self.registry('ir.model.data') |
|
||||
self.ru_obj = self.registry('res.users') |
|
||||
|
self.ru_obj = self.env['res.users'] |
||||
|
|
||||
# Get Database name |
|
||||
self.db = threading.current_thread().dbname |
|
||||
|
self.db = self.env.cr.dbname |
||||
|
|
||||
# Get ids from xml_ids |
|
||||
self.admin_user_id = self.imd_obj.get_object_reference( |
|
||||
self.cr, self.uid, 'base', 'user_root')[1] |
|
||||
self.demo_user_id = self.imd_obj.get_object_reference( |
|
||||
self.cr, self.uid, 'base', 'user_demo')[1] |
|
||||
|
self.admin_user = self.ru_obj.search([('id', '=', SUPERUSER_ID)]) |
||||
|
self.passkey_user = self.ru_obj.create({ |
||||
|
'login': 'passkey', |
||||
|
'password': 'PasskeyPa$$w0rd', |
||||
|
'name': 'passkey' |
||||
|
}) |
||||
|
|
||||
# Test Section |
|
||||
def test_01_normal_login_admin_succeed(self): |
def test_01_normal_login_admin_succeed(self): |
||||
"""[Regression Test] |
|
||||
Test the succeed of login with 'admin' / 'admin'""" |
|
||||
res = self.ru_obj.authenticate(self.db, 'admin', 'admin', {}) |
|
||||
self.assertEqual( |
|
||||
res, self.admin_user_id, |
|
||||
"'admin' / 'admin' login must succeed.") |
|
||||
|
# NOTE: Can fail if admin password changed |
||||
|
self.admin_user.check_credentials('admin') |
||||
|
|
||||
def test_02_normal_login_admin_fail(self): |
def test_02_normal_login_admin_fail(self): |
||||
"""[Regression Test] |
|
||||
Test the fail of login with 'admin' / 'bad_password'""" |
|
||||
res = self.ru_obj.authenticate(self.db, 'admin', 'bad_password', {}) |
|
||||
self.assertEqual( |
|
||||
res, False, |
|
||||
"'admin' / 'bad_password' login must fail.") |
|
||||
|
|
||||
def test_03_normal_login_demo_succeed(self): |
|
||||
"""[Regression Test] |
|
||||
Test the succeed of login with 'demo' / 'demo'""" |
|
||||
res = self.ru_obj.authenticate(self.db, 'demo', 'demo', {}) |
|
||||
self.assertEqual( |
|
||||
res, self.demo_user_id, |
|
||||
"'demo' / 'demo' login must succeed.") |
|
||||
|
|
||||
def test_04_normal_login_demo_fail(self): |
|
||||
"""[Regression Test] |
|
||||
Test the fail of login with 'demo' / 'bad_password'""" |
|
||||
res = self.ru_obj.authenticate(self.db, 'demo', 'bad_password', {}) |
|
||||
self.assertEqual( |
|
||||
res, False, |
|
||||
"'demo' / 'bad_password' login must fail.") |
|
||||
|
|
||||
def test_05_passkey_login_demo_succeed(self): |
|
||||
"""[New Feature] |
|
||||
Test the succeed of login with 'demo' / 'admin'""" |
|
||||
res = self.ru_obj.authenticate(self.db, 'demo', 'admin', {}) |
|
||||
self.assertEqual( |
|
||||
res, self.demo_user_id, |
|
||||
"'demo' / 'admin' login must succeed.") |
|
||||
|
|
||||
def test_06_passkey_login_demo_succeed(self): |
|
||||
|
with self.assertRaises(exceptions.AccessDenied): |
||||
|
self.admin_user.check_credentials('bad_password') |
||||
|
|
||||
|
def test_03_normal_login_passkey_succeed(self): |
||||
|
""" This test cannot pass because in some way the the _uid of |
||||
|
passkey_user is equal to admin one so when entering the |
||||
|
original check_credentials() method, it raises an exception |
||||
|
""" |
||||
|
try: |
||||
|
self.passkey_user.check_credentials('passkey') |
||||
|
except exceptions.AccessDenied: |
||||
|
# This exception is raised from the origin check_credentials() |
||||
|
# method and its an expected behaviour as we catch this in our |
||||
|
# check_credentials() |
||||
|
pass |
||||
|
|
||||
|
def test_04_normal_login_passkey_fail(self): |
||||
|
with self.assertRaises(exceptions.AccessDenied): |
||||
|
self.passkey_user.check_credentials('bad_password') |
||||
|
|
||||
|
def test_05_passkey_login_passkey_with_admin_password_succeed(self): |
||||
|
# NOTE: Can fail if admin password changed |
||||
|
self.passkey_user.check_credentials('admin') |
||||
|
|
||||
|
def test_06_passkey_login_passkey_succeed(self): |
||||
"""[Bug #1319391] |
"""[Bug #1319391] |
||||
Test the correct behaviour of login with 'bad_login' / 'admin'""" |
Test the correct behaviour of login with 'bad_login' / 'admin'""" |
||||
exception_raised = False |
|
||||
try: |
|
||||
self.ru_obj.authenticate(self.db, 'bad_login', 'admin', {}) |
|
||||
except: |
|
||||
exception_raised = True |
|
||||
self.assertEqual( |
|
||||
exception_raised, False, |
|
||||
"'bad_login' / 'admin' musn't raise Error.") |
|
||||
|
res = self.ru_obj.authenticate(self.db, 'bad_login', 'admin', {}) |
||||
|
self.assertFalse(res) |
@ -0,0 +1,171 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) |
||||
|
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html |
||||
|
|
||||
|
from lxml import html |
||||
|
|
||||
|
from werkzeug.test import Client |
||||
|
from werkzeug.wrappers import BaseResponse |
||||
|
|
||||
|
from odoo.tests import common |
||||
|
from odoo.service import wsgi_server |
||||
|
|
||||
|
|
||||
|
@common.post_install(True) |
||||
|
class TestUI(common.HttpCase): |
||||
|
|
||||
|
def setUp(self): |
||||
|
super(TestUI, self).setUp() |
||||
|
|
||||
|
with self.registry.cursor() as test_cursor: |
||||
|
env = self.env(test_cursor) |
||||
|
|
||||
|
self.admin_password = 'AdminPa$$w0rd' |
||||
|
env.ref('base.user_root').password = self.admin_password |
||||
|
self.passkey_password = 'PasskeyPa$$w0rd' |
||||
|
self.passkey_user = env['res.users'].create({ |
||||
|
'name': 'passkey', |
||||
|
'login': 'passkey', |
||||
|
'email': 'passkey', |
||||
|
'password': self.passkey_password |
||||
|
}) |
||||
|
self.dbname = env.cr.dbname |
||||
|
|
||||
|
self.werkzeug_environ = {'REMOTE_ADDR': '127.0.0.1'} |
||||
|
self.test_client = Client(wsgi_server.application, BaseResponse) |
||||
|
self.test_client.get('/web/session/logout') |
||||
|
|
||||
|
def html_doc(self, response): |
||||
|
"""Get an HTML LXML document.""" |
||||
|
return html.fromstring(response.data) |
||||
|
|
||||
|
def csrf_token(self, response): |
||||
|
"""Get a valid CSRF token.""" |
||||
|
doc = self.html_doc(response) |
||||
|
return doc.xpath("//input[@name='csrf_token']")[0].get('value') |
||||
|
|
||||
|
def get_request(self, url, data=None): |
||||
|
return self.test_client.get( |
||||
|
url, query_string=data, follow_redirects=True) |
||||
|
|
||||
|
def post_request(self, url, data=None): |
||||
|
return self.test_client.post( |
||||
|
url, data=data, follow_redirects=True, |
||||
|
environ_base=self.werkzeug_environ) |
||||
|
|
||||
|
def test_01_normal_login_admin_succeed(self): |
||||
|
# Our admin user wants to go to backoffice part of Odoo |
||||
|
response = self.get_request('/web/', data={'db': self.dbname}) |
||||
|
|
||||
|
# He notices that his redirected to login page as not authenticated |
||||
|
self.assertIn('oe_login_form', response.data) |
||||
|
|
||||
|
# He needs to enters his credentials and submit the form |
||||
|
data = { |
||||
|
'login': 'admin', |
||||
|
'password': self.admin_password, |
||||
|
'csrf_token': self.csrf_token(response), |
||||
|
'db': self.dbname |
||||
|
} |
||||
|
response = self.post_request('/web/login/', data=data) |
||||
|
|
||||
|
# He notices that his redirected to backoffice |
||||
|
self.assertNotIn('oe_login_form', response.data) |
||||
|
|
||||
|
def test_02_normal_login_admin_fail(self): |
||||
|
# Our admin user wants to go to backoffice part of Odoo |
||||
|
response = self.get_request('/web/', data={'db': self.dbname}) |
||||
|
|
||||
|
# He notices that he's redirected to login page as not authenticated |
||||
|
self.assertIn('oe_login_form', response.data) |
||||
|
|
||||
|
# He needs to enter his credentials and submit the form |
||||
|
data = { |
||||
|
'login': 'admin', |
||||
|
'password': 'password', |
||||
|
'csrf_token': self.csrf_token(response), |
||||
|
'db': self.dbname |
||||
|
} |
||||
|
response = self.post_request('/web/login/', data=data) |
||||
|
|
||||
|
# He mistyped his password so he's redirected to login page again |
||||
|
self.assertIn('Wrong login/password', response.data) |
||||
|
|
||||
|
def test_03_normal_login_passkey_succeed(self): |
||||
|
# Our passkey user wants to go to backoffice part of Odoo |
||||
|
response = self.get_request('/web/', data={'db': self.dbname}) |
||||
|
|
||||
|
# He notices that he's redirected to login page as not authenticated |
||||
|
self.assertIn('oe_login_form', response.data) |
||||
|
|
||||
|
# He needs to enter his credentials and submit the form |
||||
|
data = { |
||||
|
'login': self.passkey_user.login, |
||||
|
'password': self.passkey_password, |
||||
|
'csrf_token': self.csrf_token(response), |
||||
|
'db': self.dbname |
||||
|
} |
||||
|
response = self.post_request('/web/login/', data=data) |
||||
|
|
||||
|
# He notices that his redirected to backoffice |
||||
|
self.assertNotIn('oe_login_form', response.data) |
||||
|
|
||||
|
def test_04_normal_login_passkey_fail(self): |
||||
|
# Our passkey user wants to go to backoffice part of Odoo |
||||
|
response = self.get_request('/web/', data={'db': self.dbname}) |
||||
|
|
||||
|
# He notices that he's redirected to login page as not authenticated |
||||
|
self.assertIn('oe_login_form', response.data) |
||||
|
|
||||
|
# He needs to enter his credentials and submit the form |
||||
|
data = { |
||||
|
'login': self.passkey_user.login, |
||||
|
'password': 'password', |
||||
|
'csrf_token': self.csrf_token(response), |
||||
|
'db': self.dbname |
||||
|
} |
||||
|
response = self.post_request('/web/login/', data=data) |
||||
|
|
||||
|
# He mistyped his password so he's redirected to login page again |
||||
|
self.assertIn('Wrong login/password', response.data) |
||||
|
|
||||
|
def test_05_passkey_login_with_admin_password_succeed(self): |
||||
|
# Our admin user wants to login as passkey user |
||||
|
response = self.get_request('/web/', data={'db': self.dbname}) |
||||
|
|
||||
|
# He notices that his redirected to login page as not authenticated |
||||
|
self.assertIn('oe_login_form', response.data) |
||||
|
|
||||
|
# He needs to enters its password with passkey user's login |
||||
|
data = { |
||||
|
'login': self.passkey_user.login, |
||||
|
'password': self.admin_password, |
||||
|
'csrf_token': self.csrf_token(response), |
||||
|
'db': self.dbname |
||||
|
} |
||||
|
response = self.post_request('/web/login/', data=data) |
||||
|
|
||||
|
# He notices that his redirected to backoffice |
||||
|
self.assertNotIn('oe_login_form', response.data) |
||||
|
|
||||
|
def test_06_passkey_login_with_same_password_as_admin(self): |
||||
|
self.passkey_user.password = self.admin_password |
||||
|
|
||||
|
# Our passkey user wants to go to backoffice part of Odoo |
||||
|
response = self.get_request('/web/', data={'db': self.dbname}) |
||||
|
|
||||
|
# He notices that his redirected to login page as not authenticated |
||||
|
self.assertIn('oe_login_form', response.data) |
||||
|
|
||||
|
# He needs to enters his credentials and submit the form |
||||
|
data = { |
||||
|
'login': self.passkey_user.login, |
||||
|
'password': self.admin_password, |
||||
|
'csrf_token': self.csrf_token(response), |
||||
|
'db': self.dbname |
||||
|
} |
||||
|
response = self.post_request('/web/login/', data=data) |
||||
|
|
||||
|
# He notices that his redirected to backoffice |
||||
|
self.assertNotIn('oe_login_form', response.data) |
@ -1,47 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!-- ********************************************************************** --> |
|
||||
<!--Admin Passkey module for OpenERP --> |
|
||||
<!--Copyright (C) 2013-2014 GRAP (http://www.grap.coop) --> |
|
||||
<!--@author Sylvain LE GAL (https://twitter.com/legalsylvain) --> |
|
||||
|
|
||||
<!--This program is free software: you can redistribute it and/or modify --> |
|
||||
<!--it under the terms of the GNU Affero General Public License as --> |
|
||||
<!--published by the Free Software Foundation, either version 3 of the --> |
|
||||
<!--License, or (at your option) any later version. --> |
|
||||
|
|
||||
<!--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 Affero General Public License for more details. --> |
|
||||
|
|
||||
<!--You should have received a copy of the GNU Affero General Public License--> |
|
||||
<!--along with this program. If not, see <http://www.gnu.org/licenses/>. --> |
|
||||
<!-- ********************************************************************** --> |
|
||||
<openerp> |
|
||||
<data> |
|
||||
|
|
||||
<record id="view_res_config_settings" model="ir.ui.view"> |
|
||||
<field name="name">base.config.settings.view</field> |
|
||||
<field name="model">base.config.settings</field> |
|
||||
<field name="inherit_id" ref="base_setup.view_general_configuration"/> |
|
||||
<field name="arch" type="xml"> |
|
||||
<xpath expr="//label[@string='Email']/.." position='after'> |
|
||||
<group> |
|
||||
<label for="id" string="Passkey"/> |
|
||||
<div> |
|
||||
<div> |
|
||||
<field name="auth_admin_passkey_send_to_admin" class="oe_inline"/> |
|
||||
<label for="auth_admin_passkey_send_to_admin"/> |
|
||||
</div> |
|
||||
<div> |
|
||||
<field name="auth_admin_passkey_send_to_user" class="oe_inline"/> |
|
||||
<label for="auth_admin_passkey_send_to_user"/> |
|
||||
</div> |
|
||||
</div> |
|
||||
</group> |
|
||||
</xpath> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
|
||||
</data> |
|
||||
</openerp> |
|
@ -0,0 +1,27 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
|
||||
|
<record id="view_res_config_settings" model="ir.ui.view"> |
||||
|
<field name="name">base.config.settings.view</field> |
||||
|
<field name="model">base.config.settings</field> |
||||
|
<field name="inherit_id" ref="base_setup.view_general_configuration"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//label[@name='email_label']/.." position='after'> |
||||
|
<group> |
||||
|
<label for="id" string="Passkey"/> |
||||
|
<div> |
||||
|
<div> |
||||
|
<field name="auth_admin_passkey_send_to_admin" class="oe_inline"/> |
||||
|
<label for="auth_admin_passkey_send_to_admin"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<field name="auth_admin_passkey_send_to_user" class="oe_inline"/> |
||||
|
<label for="auth_admin_passkey_send_to_user"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</group> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1 @@ |
|||||
|
__import__('pkg_resources').declare_namespace(__name__) |
@ -0,0 +1 @@ |
|||||
|
__import__('pkg_resources').declare_namespace(__name__) |
@ -0,0 +1 @@ |
|||||
|
../../../../auth_admin_passkey |
@ -0,0 +1,6 @@ |
|||||
|
import setuptools |
||||
|
|
||||
|
setuptools.setup( |
||||
|
setup_requires=['setuptools-odoo'], |
||||
|
odoo_addon=True, |
||||
|
) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue