Allow auth backends to act on a user-list query before it's executed.
Review Request #5521 — Created Feb. 21, 2014 and submitted
Added an overrideable function to AuthBackend which is called at the beginning of UserResource.get_query_set(), which in turn is called by the GET /users/ WebAPI call. The default function does nothing. This allows backends to add their own logic to fetch users from an external source and add them to the local user database (or update existing users) before the db query is executed.
I added docs and fixed the doc for another AuthBackend overrideable function while I was there.
All tests pass aside from a few VCS-dependent ones, which are skipped.
Description | From | Last Updated |
---|---|---|
Can you instead say: "This function is executed when querying :ref:webapi2.0-user-list-resource, before retrieving the list of users from the database." |
chipx86 | |
"when the User List web API resource is called" We avoid referring to hard-coded paths in the API generally. |
chipx86 | |
"web API" |
chipx86 | |
"users", not "user" |
chipx86 |