-
-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][MIG] auth_api_key: Migration to 17.0. #591
Conversation
…custom one from shopinvader
Get rid of keychain dependency
Co-Authored-By: qgroulard <[email protected]>
Api key is now based on the new version of server env Key belong to a specifiv database that can be requested based on the domain name. Just setup the db_filter with "%d^" to filter based on domain name
… to manage auth api keys
Add a migration script to create the auth.api.key records from keys defined into the cfg file Provides a specific serction name builder to continue reading the key info from the same section as the one expected by the previous version
This reverts commit bb13b69.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-auth-15.0/server-auth-15.0-auth_api_key Translate-URL: https://translation.odoo-community.org/projects/server-auth-15-0/server-auth-15-0-auth_api_key/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-auth-16.0/server-auth-16.0-auth_api_key Translate-URL: https://translation.odoo-community.org/projects/server-auth-16-0/server-auth-16-0-auth_api_key/
Isn't this a native feature since the integration of TOTP? |
538e178
to
19b09b4
Compare
Do you mean the ability for a user to generate an API key from their profile page? There is some overlap indeed, but imho there is still use for this addon.
|
return self._retrieve_api_key(key).user_id.id | ||
|
||
def _clear_key_cache(self): | ||
self.env.registry.clear_cache() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests were failing before because clearing the orm cache using clear_cache()
is not available anymore in 17.0 on the cache object. It was removed in this commit with the introduction of multiple caches. Needed to call env.registry.clear_cache()
instead. Might be useful for other migrations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisb-c01 Thanks for the details!
OK, IMO you should add that explanations to the README. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/ocabot migration auth_api_key |
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at cd9e49b. Thanks a lot for contributing to OCA. ❤️ |
No description provided.