🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@fhightower
Copy link

@fhightower fhightower commented Nov 25, 2025

Trac ticket number

N/A

Branch description

Fixing method signature for ModelBackend.user_can_authenticate and moving user_can_authenticate to proper location under AllowAllUsersRemoteUserBackend.

Thanks in advanced for your consideration of this change! I appreciate the work you do!

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • (N/A) I have checked the "Has patch" ticket flag in the Trac system.
  • (N/A) I have added or updated relevant tests.
  • (N/A) I have added or updated relevant docs, including release notes if applicable.
  • (N/A) I have attached screenshots in both light and dark modes for any UI changes.

Updated the method signature for user_can_authenticate and added AllowAllUsersRemoteUserBackend class documentation.
@github-actions github-actions bot added the no ticket Based on PR title, no linked Trac ticket label Nov 25, 2025
``app_label``.

.. method:: user_can_authenticate()
.. method:: user_can_authenticate(user)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function takes the user as an argument.

users because :attr:`~AllowAllUsersRemoteUserBackend.user_can_authenticate` always
returns ``True``.

.. method:: user_can_authenticate()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this method from the docs for RemoteUserBackend to AllowAllUsersRemoteUserBackend as that's where it's uniquely defined (RemoteUserBackend just inherits from ModelBackend).

.. class:: AllowAllUsersRemoteUserBackend

Same as :class:`RemoteUserBackend` except that it doesn't reject inactive
users because :attr:`~AllowAllUsersRemoteUserBackend.user_can_authenticate` always
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I also changed ":attr:~RemoteUserBackend.user_can_authenticate" to ":attr:~AllowAllUsersRemoteUserBackend.user_can_authenticate" as AllowAllUsersRemoteUserBackend.user_can_authenticate is the function being discussed here that always returns True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no ticket Based on PR title, no linked Trac ticket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant