def METHOD_NAME(self, *args, **kw):
    user = self.request.user
    if user.is_authenticated():
        if self.can_login(user):
            return HttpResponseRedirect(
                reverse('admin:index')
            )
        else:
            auth_logout(self.request)
            return django_login_view(
                self.request,
                extra_context={
                    'ldap_permission_error': 1,
                    'ldap_error_msg': ('Only superusers or DBA Role '
                                       'users can login with LDAP')
                },
                **kw
            )
    return django_login_view(self.request, **kw)