tiangolo / full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

nsxsnx opened this issue · 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.

Created pull request #538 to fix