Split reviewboard.accounts.backends into smaller modules.

Review Request #9988 — Created May 31, 2018 and submitted

chipx86
Review Board
release-3.0.x
eaecbb6...
reviewboard

Once upon a time, reviewboard.account.backends just housed a couple of
small authentication backends, but over time the number of backends grew
and the infrastructure around it evolved, turning it into a pretty large
module.

This change splits up this module into smaller pieces, and adds
forwarding imports to ensure that all existing code works as before.
Each backend is now in its own module, with the base class being in a
base.py and all tracking of modules and settings in a registry.py.

Aside from code movement, there are two additional code changes:

  1. AuthBackend (the base class) has been renamed to BaseAuthBackend.
    An alias exists in reviewboard.accounts.backends to prevent
    existing code from breaking.

  2. INVALID_USERNAME_CHAR_REGEX is now a member of BaseAuthBackend,
    instead of being a global variable. An alias exists for this as well.

Documentation and any remaining code style improvements will be made in
an upcoming change.

Unit tests pass.

Ran Review Board and selected authentication backends. Didn't encounter
any issues loading a list of modules or their forms.

Tested that the old entrypoints (without re-running setup.py develop)
continued to work due to the forwarding imports.

Tested that the new entrypoints overrode the old ones and work.

  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (7b2b4ae)
Loading...