Skip to content

Migration of auth_signup_verify_email to 10.0#718

Merged
moylop260 merged 3 commits into
OCA:10.0from
sharkende:10.0
Feb 28, 2017
Merged

Migration of auth_signup_verify_email to 10.0#718
moylop260 merged 3 commits into
OCA:10.0from
sharkende:10.0

Conversation

@sharkende

Copy link
Copy Markdown

Module set to installable
Odoo don't let signup without password

Odoo don't let signup without password
@oca-clabot

Copy link
Copy Markdown

Hey @sharkende, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/website.cla
Here is a list of the users:

  • vincent (no github login found)

Appreciation of efforts,
OCA CLAbot

@pedrobaeza pedrobaeza mentioned this pull request Jan 27, 2017
63 tasks
@sharkende

Copy link
Copy Markdown
Author

Hi pedrobaeza,
Because I'm new I would like to know if there is anything more I need to do for the pull request ?
Thanks in advance.

@pedrobaeza

Copy link
Copy Markdown
Member

If you have signed the CLA, you just have to wait that at least 2 reviewers validate your work. See https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md#review for more information.

@sharkende

Copy link
Copy Markdown
Author

Ok thanks

@Fenkiou

Fenkiou commented Feb 23, 2017

Copy link
Copy Markdown

Any news on this one ? Changes in this PR aren't that big, could someone take a look to validate it? @yajo and @moylop260 were the ones that migrated it from 8.0 to 9.0.

Thanks!

@pedrobaeza

Copy link
Copy Markdown
Member

If you want this to be reviewed, review other PRs from the same repo or others and ask in exchange to review this one.

@elicoidal

Copy link
Copy Markdown

You probably have to adapt a bit the README file: for example the runbot URL and refresh with newest template.


# Remove password
values["password"] = False
values["password"] = ""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot understand the reasoning behind this change. Could you explain please?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well Odoo 10.0 doesn't allow to signup without password (False) but it work with an empty password/string ("").

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I have searched through the code and cannot see where it breaks, could you point me to it please? The field is not required after all...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I have search it too and to be honest I don't remember where it breaks. I just know that it works :/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I don't say it doesn't work, but I suspect it works also with previous implementation, and it's not a good practice to store empty strings in fields. I don't feel comfortable skipping good practices precisely in the password field 🤔, so please elaborate this need before merging.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use the module as is with the password set to False, we can't signup:

Traceback (most recent call last):
  File "/Users/alex/Documents/workspace/odoo/addons/10.0/server-tools/auth_signup_verify_email/controllers/main.py", line 43, in passwordless_signup
    sudo_users.signup(values, qcontext.get("token"))
  File "/Users/alex/Documents/workspace/odoo/odoo10/addons/auth_signup/models/res_users.py", line 71, in signup
    self._signup_create_user(values)
  File "/Users/alex/Documents/workspace/odoo/odoo10/addons/auth_signup/models/res_users.py", line 98, in _signup_create_user
    raise SignupError(ustr(e))
SignupError: secret must be unicode or bytes, not bool

Can't find why this is raised, but, as stated in the code for the password field: "Keep empty if you don't want the user to be able to connect on the system." and the default value is '' not False

I think even for odoo 9, the password should be set to ''

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OH I see, thanks! 😊 It's because of the secret computation. It needs strings to work.

@sharkende

Copy link
Copy Markdown
Author

@elicoidal Ok for the runbot url but the newest template ? I don't see anything different. Can you explain please ?

@moylop260
moylop260 merged commit 385e9b7 into OCA:10.0 Feb 28, 2017
@moylop260

Copy link
Copy Markdown
Contributor

FYI continuation of this PR Vauxoo#90

@legalsylvain

Copy link
Copy Markdown
Contributor

The Merge of this PR seems to have broken Travis. (Commit n° 385e9b7)

https://github.com/OCA/server-tools/commits/10.0

@moylop260, @sharkende Could you take a look ?

thanks.

@legalsylvain legalsylvain mentioned this pull request Mar 1, 2017
@Fenkiou

Fenkiou commented Mar 1, 2017

Copy link
Copy Markdown

@legalsylvain I don't know how travis is able to run this module's tests as they are still using openerp package.

For me, to run the tests, I had to:

Also, for having the test pass in case of a running smtp server, I had to set the timeout to 20sec not sure that's relevant

@florian-dacosta

Copy link
Copy Markdown
Contributor

I think #762 may fix these tests.

SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (14.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants