securedrop icon indicating copy to clipboard operation
securedrop copied to clipboard

Update manage py to use app context

Open nahara7 opened this issue 2 years ago • 2 comments

Status

Work in progress: Raises correct exceptions, fails test suite.

Description of Changes

Addresses #6188.

Exceptions for invalid usernames were not being raised. Instead, there was python traceback where ngettext was used. Adds an application context before exception calls.

Testing

From the developer environment

  • exec into Securedrop container
  • ./manage.py add-admin # Try any 2-letter username
  • ./manage.py add-journalist # Try any 2-letter username

Checklist

If you made changes to the server application code:

  • [ ] Linting (make lint) and tests (make test) pass in the development container

If you made changes to securedrop-admin:

  • [ ] Linting and tests (make -C admin test) pass in the admin development container

If you made changes to the system configuration:

Choose one of the following:

  • [ ] I have opened a PR in the docs repo for these changes, or will do so later
  • [ ] I would appreciate help with the documentation
  • [x] These changes do not require documentation

nahara7 avatar May 03 '22 17:05 nahara7

Hi @nahara7, just touching base - are you still interested in working further on this?

eloquence avatar Jul 13 '22 00:07 eloquence

Hi @nahara7, just checking in if you'd like to continue to work on this, or if you'd prefer if someone else pick this up.

eloquence avatar Sep 19 '22 19:09 eloquence