Skip to content
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

[WIP] Refactor checks in API auth commands #7306

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmmarcos
Copy link
Contributor

A require_valid_organization_and_author (better name wanted!) decorator is added to remove duplicate code from API commands. Essentially, it checks that organization exists and is not expired, and that the author exists and is not revoked.

It still needs some type hints improvements (see TODO comments) which may require further refactoring in PG components.

Closes #7119

@mmmarcos mmmarcos requested a review from vxgmichel May 15, 2024 09:47
@mmmarcos mmmarcos force-pushed the remove-duplicate-code-in-auth-routes branch from da98bcb to e044900 Compare May 15, 2024 10:06
@mmmarcos mmmarcos force-pushed the remove-duplicate-code-in-auth-routes branch from e044900 to 0015180 Compare May 15, 2024 12:01
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.

[Server v3] Remove code duplication for each authenticated route
1 participant