Commit graph

32 commits

Author SHA1 Message Date
Tom Hubrecht 1fea8ed462 Remove useless migrations 2023-05-19 15:21:47 +02:00
Tom Hubrecht 68065c94ef Explicitely set transform=repr in assertQuerysetEquals 2023-05-19 15:21:19 +02:00
Tom Hubrecht e8143856f5 Use AutoField instead of BigAutoField 2023-05-19 15:21:19 +02:00
Tom Hubrecht 8c0f2a43bf Remove default_app_config 2023-05-19 15:21:19 +02:00
Tom Hubrecht b8aa30a2e9 ugettext -> gettext 2023-05-19 15:20:44 +02:00
Tom Hubrecht a2ef251252 Update django version 2023-05-19 15:18:57 +02:00
Tom Hubrecht 892bf51163 Run black on all files 2023-05-19 14:57:48 +02:00
Ludovic Stephan a34b83c236 Use backend to enforce frozen accounts 2021-06-15 16:52:50 +02:00
Ludovic Stephan 47f406e09e Fix tests 2021-02-23 22:52:39 +01:00
Ludovic Stephan c5d7eb9d30 Move permission handling to loadkfetdevdata 2020-09-07 14:57:41 +02:00
Ludovic Stephan d3185f25c3 Black 2020-09-07 14:57:41 +02:00
Ludovic Stephan 007b5006d4 Use convenience imports 2020-09-07 14:57:41 +02:00
Ludovic Stephan 2d36c85085 Fix dev data 2020-09-07 14:57:41 +02:00
Ludovic Stephan d6fa738a25 Fix tests 2020-09-07 14:57:41 +02:00
Ludovic Stephan c145191e55 Use new models and mixins 2020-09-07 14:57:41 +02:00
Ludovic Stephan e92d50593c New models 2020-09-07 14:57:41 +02:00
Martin Pépin dcd592ed11
Fix 100 tests wrt. 754a0b70e (big url changes) 2020-09-02 20:28:19 +02:00
Ludovic Stephan ea45eb1f55 Fix tests 2019-11-21 01:21:26 +01:00
Ludovic Stephan c1a99453d5 Add password auth decorator 2019-11-21 01:21:26 +01:00
Ludovic Stephan be5218f7e1 Remove pesky middleware 2019-11-21 01:21:26 +01:00
Ludovic Stephan 03c74a7940 Misc fixes 2019-04-17 20:50:49 +02:00
Ludovic Stephan 5fd4cb5c78 Change django.core.urlresolvers imports
-- compatible with 1.11 --
2019-03-19 10:18:56 +01:00
Aurélien Delobelle fdd2b35289 core -- Apply black + isort to all files 2018-10-06 13:15:33 +02:00
Martin Pépin 5a5b60ec4d Merge branch 'master' into Kerl/drop_py2_compat 2018-01-10 20:12:59 +01:00
Martin Pépin 475f1adec5 Remove "coding: utf8" line 2018-01-06 16:10:13 +01:00
Aurélien Delobelle b0b0542407 Upgrade to Django 1.11
- Deprecation warnings using Django 1.8 are resolved.
- Deprecation warnings using Django 1.11 are resolved.

- Admin: grappelli is no longer used.
- Upgrade to django-autocomplete-light v3 (v2 is not 1.11 compatible).
  * autocomplete.modelform_factory being dropped, code uses dal Select2
    views and widgets.
2017-11-19 18:41:39 +01:00
Aurélien Delobelle af3a7cf697 Reapply fix to kfetauth (…) and fix tests 2017-10-24 17:56:14 +02:00
Aurélien Delobelle b42452080f Mass cleaning of kfet' authentication machinery
AccountBackend
- Should now work if used in AUTHENTICATION_BACKENDS settings.
- It does not retieve itself the password, as it should not be used
this way.

GenericBackend
- Delete useless 'username' arg of its 'authenticate()' method.
- Now delete the token in DB.

TemporaryAuthMiddleware
- New name of the middleware is more meaningful.
- Is now responsible to retrieve the password from the request, instead
of the AccountBackend.

GenericTeamToken model
- Add a manager' method to create token, avoiding possible error due to
unicity constraint.

GenericLoginView (authentication with the kfet generic user)
- Replace obscure system with a 100% HTTP handling.
- See comments for more information.

Misc
- More docstrings!
- More tests!
- Add some i18n.
- Add kfet/confirm_form.html template:
    Ask user to confirm sth via a form (which will send a POST request).
    Context variables:
        * title: the page title
        * confirm_url: action attribute for <form>
        * text: displayed confirmation text
- kfet.js : Add functions allowing to emit POST request from <a> tag.
- Non-link nav items from kfet navbar also get a 'title'.
- A utility has been found for the 'sunglasses' glyphicon!
2017-09-25 17:57:47 +02:00
Aurélien Delobelle 3fa7754ff4 KFet Backends inherit from BaseKFetBackend
Users who authenticate via a KFetBackend got extra select related.
It should save 2 db queries on each request for these users.
2017-09-23 20:48:28 +02:00
Aurélien Delobelle e5d19811e8 Clean code related to kfet password 2017-09-22 23:31:46 +02:00
Aurélien Delobelle 1d19d1797c Clean setup/retrieve of kfet generic account 2017-09-22 01:24:44 +02:00
Aurélien Delobelle bf61e41b50 Move auth-related from 'kfet' app to 'kfet.auth'. 2017-09-19 17:05:51 +02:00