Page MenuHomeSoftware Heritage

tests/auth/test_backends: Document each test case

Authored by anlambert on Thu, Jun 18, 12:13 PM.

Diff Detail

rDWAPPS Web applications
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert created this revision.Thu, Jun 18, 12:13 PM

Build is green

Patch application report for D3312 (id=11723)

Could not rebase; Attempt merge onto e926cadb92...

Updating e926cadb..bf7f32c1
 swh/web/api/            |  6 ++-
 swh/web/auth/             |  5 +++
 swh/web/auth/               | 39 ++++++++++++++++++-
 swh/web/tests/api/ | 35 +++++++++++++++++-
 swh/web/tests/auth/  | 20 ++++++++--
 swh/web/tests/auth/    | 27 ++++++++++++++
 swh/web/tests/auth/  | 72 +++++++++++++++++++++++++++++++++---
 7 files changed, 190 insertions(+), 14 deletions(-)
Changes applied before test
commit bf7f32c14e87f860d946b04251d7be6acf868f4c
Author: Antoine Lambert <>
Date:   Thu Jun 18 12:10:33 2020 +0200

    tests/auth/test_backends: Document each test case

commit 644fcc014b1faa5003400dcaee5a831147feba6d
Author: Antoine Lambert <>
Date:   Wed Jun 17 17:40:18 2020 +0200

    api/throttling: Lift rate limit when user has special permission
    If a Django user has the "swh.web.api.throttling_exempted" permission, he
    will not be rate limited.
    Related to T1927

commit 7e719461588132fdaf854e20ccf244b83bc607da
Author: Antoine Lambert <>
Date:   Wed Jun 17 16:02:08 2020 +0200

    auth: Map Keycloak user permissions to Django ones
    Keycloak user permissions are named Roles in Keycloak semantics.
    Extract them from each decoded access token and override methods from
    django.contrib.auth.models.PermissionsMixin in order to manipulate them
    as Django user permissions.
    Closes T2247

See for more details.

ardumont accepted this revision.Thu, Jun 18, 1:44 PM
ardumont added a subscriber: ardumont.

Thanks ;)

This revision is now accepted and ready to land.Thu, Jun 18, 1:44 PM
This revision was automatically updated to reflect the committed changes.