Skip to content

[18.0][MIG] auth_oauth_multi_token: Migration to 18.0#743

Closed
kobros-tech wants to merge 20 commits intoOCA:18.0from
kobros-tech:18.0-mig-auth_oauth_multi_token
Closed

[18.0][MIG] auth_oauth_multi_token: Migration to 18.0#743
kobros-tech wants to merge 20 commits intoOCA:18.0from
kobros-tech:18.0-mig-auth_oauth_multi_token

Conversation

@kobros-tech
Copy link
Copy Markdown
Contributor

Based on PR 742 which is just improvement of PR 694
#694 => #742 [17.0][MIG]

Florent de Labarre and others added 19 commits December 31, 2024 12:41
Allow multiple oauth login at the same time.
* cleanup, improve, docstrings
* add tests
Nothing special. Just making linters happy and splitting the readme.

@Tecnativa TT25619
Otherwise lookup is slow when there are many users.
Otherwise you can't delete a user.
This is cosmetic only, because this field is not used
when auth_oauth_multi_token is installed.
Currently translated at 100.0% (15 of 15 strings)

Translation: server-auth-16.0/server-auth-16.0-auth_oauth_multi_token
Translate-URL: https://translation.odoo-community.org/projects/server-auth-16-0/server-auth-16-0-auth_oauth_multi_token/it/
Copy link
Copy Markdown
Contributor

@dnplkndll dnplkndll left a comment

Choose a reason for hiding this comment

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

looks good functional test, oidc aws cognito

@kobros-tech
Copy link
Copy Markdown
Contributor Author

@sbidoul could you review this PR and 17.0 one too?

)
# In version 18.0 AccessDenied exception is raising ValueError exception
except ValueError as e:
self.assertEqual(str(e), "Unknown token version")
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.

This change to the test looks suspicious to me. It probably does not test what it was meant to test anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not at all, in version 17.0
there is one single exception raised, the one you mean!

In version 18.0, the exception you mean is raising another exception which is the source one.

I handle it and then I trace the log message for the one you mean.

If you like to update the test case all right show me your opinion.

Copy link
Copy Markdown
Contributor

@dnplkndll dnplkndll Jan 17, 2025

Choose a reason for hiding this comment

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

could I suggest:
a8955ff
prevent attempt to create versus refuse. or did we want to change the expects to be a new user?
'Exception: Unknown token version'
is thrown in the https://github.com/odoo/odoo/blob/18.0/addons/auth_oauth/models/res_users.py#L111 I believe.

@kobros-tech kobros-tech requested a review from sbidoul January 5, 2025 15:58
@kobros-tech kobros-tech force-pushed the 18.0-mig-auth_oauth_multi_token branch from b14b991 to 8ea5c67 Compare February 4, 2025 15:34
@kobros-tech
Copy link
Copy Markdown
Contributor Author

@sbidoul
you have one suggestion to review:

e6c6427

@kobros-tech kobros-tech closed this Feb 4, 2025
@kobros-tech
Copy link
Copy Markdown
Contributor Author

forwarded to #754

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.

8 participants