Skip to content

Commit

Permalink
Merge pull request #776 from Fenkiou/10-mig-auth_admin_passkey
Browse files Browse the repository at this point in the history
[10.0][MIG] auth_admin_passkey
  • Loading branch information
legalsylvain authored Jul 31, 2017
2 parents d9bebd0 + e16b37a commit 3b6b453
Show file tree
Hide file tree
Showing 39 changed files with 1,830 additions and 580 deletions.
98 changes: 80 additions & 18 deletions auth_admin_passkey/README.rst
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
* 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.
27 changes: 5 additions & 22 deletions auth_admin_passkey/__init__.py
Original file line number Diff line number Diff line change
@@ -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
33 changes: 8 additions & 25 deletions auth_admin_passkey/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
# -*- 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

{
'name': 'Authentification - Admin Passkey',
'version': '8.0.2.1.1',
'version': '10.0.1.0.0',
'category': 'base',
'author': "GRAP,Odoo Community Association (OCA)",
'website': 'http://www.grap.coop',
'license': 'AGPL-3',
'depends': [
'mail',
],
],
'data': [
'data/ir_config_parameter.xml',
'view/res_config_view.xml',
'views/res_config_view.xml',
],
'demo': [],
'js': [],
Expand All @@ -41,6 +24,6 @@
'images': [],
'post_load': '',
'application': False,
'installable': False,
'installable': True,
'auto_install': False,
}
22 changes: 2 additions & 20 deletions auth_admin_passkey/data/ir_config_parameter.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
<?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>
<odoo>
<data noupdate="1">

<record id="send_to_admin" model="ir.config_parameter">
Expand All @@ -31,4 +13,4 @@
</record>

</data>
</openerp>
</odoo>
84 changes: 84 additions & 0 deletions auth_admin_passkey/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>\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 ""
Loading

0 comments on commit 3b6b453

Please sign in to comment.