Skip to main content

get_current_active_superuser

Validates that the currently authenticated user has superuser privileges and returns the user object, raising a 403 HTTPException if the requirement is not met.

def get_current_active_superuser(
current_user: CurrentUser
) - > User

Validates that the currently authenticated user has administrative privileges and returns their user profile.

Parameters

NameTypeDescription
current_userCurrentUserThe currently authenticated user object retrieved from the security context.

Returns

TypeDescription
UserThe validated User object representing a superuser with full system access.