full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

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

Open nsxsnx opened this issue 1 year ago • 1 comments

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 avatar Sep 10 '23 15:09 nsxsnx

Created pull request #538 to fix

nsxsnx avatar Sep 10 '23 16:09 nsxsnx