Problem with custom Authentication Backend for Django

前端 未结 1 1055
没有蜡笔的小新
没有蜡笔的小新 2021-02-08 22:16

I\'m having a problem with a custom Authentication Backend I\'ve built for an Active Directory via LDAP authentication.

The problem is that from the admin login page, af

1条回答
  •  不要未来只要你来
    2021-02-08 23:03

    Figured out. Users cannot log in unless they are active (even though the documentation does not say that). Therefore, in the code given, the line that creates the new user should look like:

        user = User(username=username, is_staff = True, is_Active = True, 
                    is_superuser = False)
    

    0 讨论(0)
提交回复
热议问题