Note that only first actor_from_request value is respected

https://github.com/datasette/datasette-profiles/issues/4#issuecomment-2758588167
This commit is contained in:
Simon Willison 2025-03-27 09:09:57 -07:00 committed by GitHub
commit d021ce97aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1026,7 +1026,7 @@ actor_from_request(datasette, request)
This is part of Datasette's :ref:`authentication and permissions system <authentication>`. The function should attempt to authenticate an actor (either a user or an API actor of some sort) based on information in the request.
If it cannot authenticate an actor, it should return ``None``. Otherwise it should return a dictionary representing that actor.
If it cannot authenticate an actor, it should return ``None``, otherwise it should return a dictionary representing that actor. Once a plugin has returned an actor from this hook other plugins will be ignored.
Here's an example that authenticates the actor based on an incoming API key: