[12.0][MIG] users_ldap_populate - #132
Conversation
In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association.
and remove use of deprecated except_orm on the way
* leftovers from old api * python-ldap does not like Unicode strings
* [10.0] users_ldap_populate special characters
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-10.0/server-tools-10.0-users_ldap_populate Translate-URL: https://translation.odoo-community.org/projects/server-tools-10-0/server-tools-10-0-users_ldap_populate/
|
Hey @Tardo, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
|
Please @yajo revew here thanks |
| @@ -63,9 +62,10 @@ def test_users_ldap_populate(self): | |||
| 'uid': ['fake'], | |||
| 'mail': ['fake@fakery.com'], | |||
| })]): | |||
There was a problem hiding this comment.
if you add a second dict here describing to a user that you add before as inactive (demo user will do), you also test the activating inactive users codepath which probably raises coveragfe enough to let this test pass
There was a problem hiding this comment.
I can't use demo user... if the user exists but is inactive the code raises this exception: https://github.com/odoo/odoo/blob/12.0/addons/auth_ldap/models/res_company_ldap.py#L202
There was a problem hiding this comment.
no. Turn on creating users in the demo config then
There was a problem hiding this comment.
@Tardo do you know what to do then? I confess I'm a bit lost with this stuff.
There was a problem hiding this comment.
@hbrunn Can you verify that '_get_or_create_user' can return a "false" value?
- If the user exists and is actived = The user is used
- If the user exists and is deactivated = Exception
- If the user not exists and creation is not enabled = Exception
- If the user not exists and creation is enabled = Copy/Creates a new user
There was a problem hiding this comment.
the function won't return a falsy value, but that's not the point here. Just turn on the create_user flag, then you actually test what this addon does.
There was a problem hiding this comment.
@hbrunn "create_user" is enabled by default: https://github.com/odoo/odoo/blob/12.0/addons/auth_ldap/models/res_company_ldap.py#L34
I don't understand you, sorry.
7cea0e8 to
79f8d03
Compare
|
@pedrobaeza ready to review |
|
@Tardo please squash together adjacent translations commits |
79f8d03 to
678b545
Compare
Concerns only for tests, and no more feedback
pedrobaeza
left a comment
There was a problem hiding this comment.
We can't wait more for this module, and the concerns are only in the tests part, so I'm going to merge it right now as is, and later PRs can improve that if it's a problem.
|
/ocabot merge |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at c4de99b. Thanks a lot for contributing to OCA. ❤️ |
Syncing from upstream OCA/server-auth (13.0)
Migration of users_ldap_populate from OCA/server-tools 10.0
Cc @Tecnativa