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

get_current_active_superuser() does not seem to check that superuser is actually active #537

Open
nsxsnx opened this issue Sep 10, 2023 · 1 comment

Comments

@nsxsnx
Copy link

nsxsnx commented Sep 10, 2023

Hello,
Please, correct me if I'm wrong, but I believe here in /backend/app/app/api/deps.py:

def get_current_active_superuser(
    current_user: models.User = Depends(get_current_user),
) -> models.User:

we must depend on get_current_active_user, not get_current_user to make sure that superuser is active.

@nsxsnx
Copy link
Author

nsxsnx commented Sep 10, 2023

Created pull request #538 to fix

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

No branches or pull requests

1 participant