Commit graph

663 commits

Author SHA1 Message Date
Aleksi Häkli
ecadddbf5d
Improve management commands, docs, and tests
Fixes #362

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:30 +02:00
Aleksi Häkli
99175dc57f
Use middleware, backends, and signals for lockouts
Fixes #389

Remove monkey-patching from the application loader phase
and use the Django authentication stack for lockout signals.

Utilize custom AUTHENTICATION_BACKENDS and MIDDLEWARE with signals
with backwards compatible implementation of features.

Update documentation, configuration and migration instructions
to match the new configuration and improve the code commentation.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:30 +02:00
Aleksi Häkli
d33a55b927
Use single quotes for strings
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:30 +02:00
Aleksi Häkli
d215485a66
Remove broken JSON login test case
The test did not work correctly because the admin login view
does not accept JSON input, but instead produces an error on JSON POST.

It appeared to be functional and working because the
monkey-patched decorator returned a HTTP 403 when a user was accessing the view.

This did not actually result from a failed login,
but from a premature view permission checking that was not sane.

The HTTP 403 was produced by the login function decorator
before the user was ever accessing or using the actual view.

After modifying the view checking logic to run on a login attempt
instead of before attempt (ie when accessing the view)
the admin view error that resulted from missing form POST data
was discovered and since no easy fix was available without
writing a custom view the broken test case was removed altogether.

The correct fix for supporting JSON payloads and mimetypes
can be implemented by writing a login view that supports
JSON login via eg HTTP AJAX POST and produces the same errors.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:29 +02:00
Aleksi Häkli
15d2f98980
Clean up database test case imports
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:29 +02:00
Aleksi Häkli
d293976e1c
Update test runner script and versions
- Use manage.py for running tests instead of a custom script
- Drop support for Python 3.5 for Django master for tox and Travis
- Run branch coverage tests in addition to line coverage

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:29 +02:00
Aleksi Häkli
9c328713e7
Use Django checks for cache configuration
Fixes #383

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:28 +02:00
Aleksi Häkli
6a05d5318c
Update README.rst
Add badge for monitoring requirements status
2019-01-20 18:36:16 +02:00
Aleksi Häkli
2fdc8ea05d
Merge pull request #394 from jazzband/pyup-initial-update
Initial Update
2019-01-20 18:27:11 +02:00
Aleksi Häkli
2a05631418
Merge pull request #393 from jazzband/pyup-config
Config file for pyup.io
2019-01-20 18:14:32 +02:00
pyup-bot
23cbd7302d Update tox from 3.6.0 to 3.7.0 2019-01-20 18:10:23 +02:00
pyup-bot
4a287b9a88 create pyup.io config file 2019-01-20 18:10:20 +02:00
Aleksi Häkli
db44003a18
Version 4.5.4
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-01-15 00:03:57 +02:00
Aleksi Häkli
ac87ba8efb
Add GitHub badge
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-01-15 00:02:03 +02:00
Aleksi Häkli
7a2e6e219e
Refine contribution instructions
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-01-15 00:01:53 +02:00
Aleksi Häkli
a5c2a2b10d
Improve README and add badges
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-01-14 16:43:42 +02:00
Aleksi Häkli
ee63d26f25
Version 4.5.3
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-01-14 15:25:23 +02:00
Aleksi Häkli
60f2a8ed71
Merge pull request #392 from jazzband/development
Remove AccessAttempt.trusted flag and clean up CI setup and README
2019-01-14 15:22:56 +02:00
Aleksi Häkli
4a29d5a8fc
Version 4.5.2
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-01-12 21:03:53 +02:00
Aleksi Häkli
bbcd02d805
Merge pull request #391 from obayhan/master
Turkish translation added
2019-01-12 20:56:01 +02:00
obayhan
1e52c8f29d Turkish translation added 2019-01-12 21:05:21 +03:00
Camilo Nova
9ab830b04a Bump version 2019-01-11 14:04:18 -05:00
Camilo Nova
e1bfc7d1fe Removed duplicated code 2019-01-11 12:43:11 -05:00
Reece Dunham
fc34d18404
Merge pull request #390 from lubicz-sielski/master
Russian locale
2019-01-11 09:01:57 -05:00
Sielski Olieg
33e877af88 russian locale 2019-01-11 16:25:40 +03:00
Sielski Olieg
8686c6599a russian locale 2019-01-11 15:52:24 +03:00
Aleksi Häkli
d9d6c31309 Improve README structure
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-12-25 18:55:15 +01:00
Aleksi Häkli
e42948f006 Clean up .travis.yml field ordering
Changing username or password will generate a convoluted patch
if they are on multiple different lines if they are not grouped

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-12-25 18:55:15 +01:00
Aleksi Häkli
a785e3c58c Run deploy to Jazzband only once
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-12-25 18:55:15 +01:00
Aleksi Häkli
c7e79aeaf2 Remove unused AccessAttempt.trusted flag
Fixes #344
2018-12-25 18:55:15 +01:00
Aleksi Häkli
b28ece3dae
Merge pull request #388 from jazzband/development
Version 4.5.0
2018-12-25 18:11:36 +01:00
Aleksi Häkli
b18c666ec1
Version 4.5.0
Fixes #384

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-12-25 17:47:11 +01:00
Aleksi Häkli
87f4fa2ccc
Merge pull request #387 from jazzband/coveralls
Remove deprecated coveralls from dependancies
2018-12-23 18:32:01 +01:00
Aleksi Häkli
a186e0f679
Change broken coveralls to codecov 2018-12-23 17:01:08 +01:00
Aleksi Häkli
13c395d36c
Merge pull request #385 from jazzband/django21
Fix tests for Django 2.1
2018-12-23 16:43:54 +01:00
Aleksi Häkli
396d99ccc1
Fix tests for Django 2.1
Use HTML comparisons is assertContains instead of
normal text comparisons which can change with rendering.

Fixes #374
2018-12-23 15:52:21 +01:00
Aleksi Häkli
a6561604b5 Add .idea to .gitignore 2018-12-23 15:42:37 +01:00
Aleksi Häkli
8ab4ce228f
Add tests for faulty AXES_USERNAME_CALLABLEs 2018-12-23 04:21:57 +02:00
Aleksi Häkli
becc61818f
Add another test case for AXES_USERNAME_CALLABLE
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-12-23 04:02:17 +02:00
Aleksi Häkli
b8489e0860
Fix AxesModelBackend function signature compatibility 2018-12-23 03:46:44 +02:00
Aleksi Häkli
7c3e21166e
Backwards compatibility fixes for credentials
Revert some of the PR changes to tests to make sure that all of the
old format function invocations work with the old and new tests.

Implement small enchancements to documentation and credentials resolving
for usability and flexibility with custom authentication backends.

Update documentation to indicate that backwards compatibility
is supported as well as the new format credentials invocations.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-12-23 02:58:53 +02:00
Aleksi Häkli
34f9322367
Merge pull request #377 from mastacheata/bugfix/358-credentials-in-favor-of-request
Bugfix #358 credentials in favor of request
2018-12-22 19:30:17 +01:00
Benedikt Bauer
41b532c882 Fix problem with Django Admin -> It always uses username as the username field 2018-12-20 16:48:10 +01:00
Benedikt Bauer
efc02327f3 Enhance configuration docs with detailed credentials description 2018-12-20 16:47:29 +01:00
Aleksi Häkli
1c72cf431f
Merge pull request #378 from jazzband/travis
Run tests in parallel in Travis
2018-12-20 01:21:22 +01:00
Aleksi Häkli
6847f5316d
Run tests in parallel in Travis
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-12-20 00:58:22 +01:00
Mark Davidoff
a7758b2f4b
Merge pull request #379 from mastacheata/refactor/remove-trailing-space-in-usage-rst
Strip trailing spaces in usage.rst
2018-12-19 09:33:57 -08:00
Benedikt Bauer
af1ff981dd Strip trailing spaces in usage.rst 2018-12-19 18:04:54 +01:00
Benedikt Bauer
a17c7f4706 Strip Whitespace changes from PR 2018-12-19 18:01:56 +01:00
Benedikt Bauer
2e9754914b Use get_client_username instead of manual username lookup for cache key 2018-12-19 16:33:32 +01:00