python - why buildin login_required decorator not check user.is_active -


why django buildin login_required decorator not check is_active flag ?

i have use decorator or auth type secure issue?

my solution override decorator:

from django.contrib.auth.decorators import login_required login  def login_required(fn):     @login     def wrapper(*args, **kwargs):         return fn(*args, **kwargs) if args[0].user.is_active else httpresponse()     return wrapper 


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -