[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 <43472442+qgroulard@users.noreply.github.com>
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.
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.
|
OK, IMO you should add that explanations to the README. |
|
/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.