forked from OCA/server-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f806deb
commit fc447df
Showing
8 changed files
with
42 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,16 +6,16 @@ | |
Verify email at signup | ||
====================== | ||
|
||
This module extends the functionality of public sign up, and forces users to | ||
This module extends the functionality of public sign up to force users to | ||
provide a valid email address. | ||
|
||
To achieve this requirement, the user does not need to provide a password at | ||
sign up, but when logging in later for the first time. | ||
To achieve this, users are not required to provide a password at | ||
sign up: they are asked for only at first login attempt. | ||
|
||
Installation | ||
============ | ||
|
||
* Install validate_email_ with ``pip install validate_email`` or equivalent. | ||
* Install `validate_email <https://pypi.python.org/pypi/validate_email>`_ with ``pip install validate_email`` or equivalent. | ||
|
||
Configuration | ||
============= | ||
|
@@ -24,8 +24,7 @@ To configure this module, you need to: | |
|
||
* `Properly configure your outgoing email server(s) | ||
<https://www.odoo.com/es_ES/forum/help-1/question/how-to-configure-email-gateway-282#answer_290>`_. | ||
* Go to *Settings > General Settings* and enable *Allow | ||
external users to sign up*. | ||
* Go to *Settings > General Settings -> General settings*, search for the *Users* section and enable *Free sign up* in *Customer account*. | ||
|
||
Usage | ||
===== | ||
|
@@ -37,7 +36,7 @@ To use this module, you need to: | |
|
||
.. 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/9.0 | ||
:target: https://runbot.odoo-community.org/runbot/149/11.0 | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
@@ -51,7 +50,7 @@ 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 smashing it by providing a detailed and welcomed feedback. | ||
help us smash it by providing detailed and welcomed feedback. | ||
|
||
|
||
Credits | ||
|
@@ -68,6 +67,7 @@ Contributors | |
|
||
* Rafael Blasco <[email protected]> | ||
* Jairo Llopis <[email protected]> | ||
* Simone Orsi <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
@@ -83,5 +83,3 @@ 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. | ||
|
||
.. _validate_email: https://pypi.python.org/pypi/validate_email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2015 Antiun Ingeniería, S.L. | ||
# Copyright 2015 Antiun Ingeniería, S.L. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2015 Antiun Ingeniería, S.L. | ||
# Copyright 2015 Antiun Ingeniería, S.L. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Verify email at signup", | ||
"summary": "Force uninvited users to use a good email for signup", | ||
"version": "10.0.1.0.0", | ||
"version": "11.0.1.0.0", | ||
"category": "Authentication", | ||
"website": "http://www.tecnativa.com", | ||
"website": "https://github.com/OCA/server-auth", | ||
"author": "Antiun Ingeniería S.L., " | ||
"Tecnativa, " | ||
"Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"application": False, | ||
'installable': True, | ||
"depends": [ | ||
"auth_signup", | ||
], | ||
"external_dependencies": { | ||
"python": [ | ||
"lxml", | ||
"validate_email", | ||
], | ||
}, | ||
"depends": [ | ||
"auth_signup", | ||
], | ||
"data": [ | ||
"views/signup.xml", | ||
], | ||
'installable': True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2015 Antiun Ingeniería, S.L. | ||
# Copyright 2015 Antiun Ingeniería, S.L. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Jairo Llopis <[email protected]> | ||
# Copyright 2016 Jairo Llopis <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import test_verify_email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Jairo Llopis <[email protected]> | ||
# Copyright 2016 Jairo Llopis <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from urllib import urlencode | ||
from lxml.html import document_fromstring | ||
from openerp import _ | ||
from openerp.tests.common import HttpCase | ||
from odoo import _ | ||
from odoo.tests.common import HttpCase | ||
from odoo.tools.misc import mute_logger | ||
|
||
|
||
class UICase(HttpCase): | ||
|
@@ -39,9 +38,8 @@ def tearDown(self): | |
|
||
def html_doc(self, url="/web/signup", data=None, timeout=10): | ||
"""Get an HTML LXML document.""" | ||
if data: | ||
data = bytes(urlencode(data)) | ||
return document_fromstring(self.url_open(url, data, timeout).read()) | ||
resp = self.url_open(url, data=data, timeout=timeout) | ||
return document_fromstring(resp.content) | ||
|
||
def csrf_token(self): | ||
"""Get a valid CSRF token.""" | ||
|
@@ -58,6 +56,7 @@ def test_bad_email(self): | |
doc = self.html_doc(data=self.data) | ||
self.assertTrue(self.search_text(doc, self.msg["badmail"])) | ||
|
||
@mute_logger('odoo.addons.auth_signup_verify_email.controllers.main') | ||
def test_good_email(self): | ||
"""Test acceptance of good emails. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- © 2016 Jairo Llopis <[email protected]> | ||
<!-- Copyright 2016 Jairo Llopis <[email protected]> | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
|
||
<template id="signup_fields" inherit_id="auth_signup.fields"> | ||
<xpath expr="//div[@class='form-group field-password']" | ||
<xpath expr="//div[hasclass('field-password')]" | ||
position="attributes"> | ||
<attribute name="t-if">only_passwords</attribute> | ||
</xpath> | ||
<xpath expr="//div[@class='form-group field-confirm_password']" | ||
<xpath expr="//div[hasclass('field-confirm_password')]" | ||
position="attributes"> | ||
<attribute name="t-if">only_passwords</attribute> | ||
</xpath> | ||
|