securedrop
securedrop copied to clipboard
Update manage py to use app context
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:
- [ ] Configuration tests pass
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
Hi @nahara7, just touching base - are you still interested in working further on this?
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.