rest-framework icon indicating copy to clipboard operation
rest-framework copied to clipboard

Revert "[16.0] fastapi: optionally authenticated partner"

Open lmignon opened this issue 1 year ago • 2 comments

Reverts OCA/rest-framework#387

lmignon avatar May 03 '24 08:05 lmignon

@lmignon do you want to merge this according to https://github.com/OCA/rest-framework/pull/387#issuecomment-2092524062

sbidoul avatar May 26 '24 10:05 sbidoul

@sbidoul I still have to think about it. The problem is not so trivial. Even if you declare the partner_id parameter as optional using type annotations, the implementation of the chosen method won't be aware of this annotation, which means that it will fail in the case of auth_jwt, for example, because it won't have found a token. Despite everything, I'm not comfortable with the proposed approach because I feel like I'm missing something. If I don't find another solution, the current code makes sense. If not, this PR could be merged with an explanation of how to cover this use case.

lmignon avatar May 27 '24 06:05 lmignon