Commit graph

1777 commits

Author SHA1 Message Date
Aurélien Delobelle
e56200a569 kfet -- LoginGenericView directly disconnects users.
Since allauth is installed, users are not automatically logged out of CAS
when logging out GestioCOF.
This change simplifies the view and avoid being stuck because of
the redirect to the logout page, which happened via a GET request and so
prompting to confirm.
2018-10-21 17:09:12 +02:00
Aurélien Delobelle
05eeb6a25c core -- Install django-allauth-ens
Refer to allauth doc for an accurate features list:
  http://django-allauth.readthedocs.io/en/latest/

Users can now change their password, ask for a password reset, or set
one if they don't have one.

In particular, it allows users whose account has been created via a
clipper authentication to configure a password before losing their
clipper. Even if they have already lost it, they are able to get one
using the "Reset password" functionality.

Allauth multiple emails management is deactivated. Requests to the
related url redirect to the home page.

All the login and logout views are replaced by the allauth' ones. It
also concerns the Django and Wagtail admin sites.

Note that users are no longer logged out of the clipper CAS server when
they authenticated via this server. Instead a message suggests the user
to disconnect.

Clipper connections and `login_clipper`
---------------------------------------

- Non-empty `login_clipper` are now unique among `CofProfile` instances.
- They are created once for users with a non-empty 'login_clipper' (with
the data migration 0014_create_clipper_connections).
- The `login_clipper` of CofProfile instances are sync with their
clipper connections:
    * `CofProfile.sync_clipper_connections` method updates the
connections based on `login_clipper`.
    * Signals receivers `sync_clipper…` update `login_clipper` based on
connections creations/updates/deletions.

Misc
----

- Add NullCharField (model field) which allows to use `unique=True` on
CharField (even with empty strings).
- Parts of kfet mixins for TestCase are now in shared.tests.testcase,
  as they are used elsewhere than in the kfet app.
2018-10-21 17:09:12 +02:00
Aurélien Delobelle
49a74e8e1e Merge branch 'Kerl/syncmails' into 'master'
Utilisation de la command `syncmails` du package custommail

See merge request cof-geek/gestioCOF!323
2018-10-21 14:22:59 +02:00
Aurélien Delobelle
0ba7100110 Merge branch 'aureplop/ci-move-services' into 'master'
core.ci -- Fix CI (postgres version) + speed up job "linters"

See merge request cof-geek/gestioCOF!324
2018-10-21 12:49:25 +02:00
Aurélien Delobelle
b795a06b9c core.ci -- Use postgres version of production server 2018-10-21 12:33:58 +02:00
Aurélien Delobelle
e478beee5c core.ci -- Narrow services to jobs that need them 2018-10-21 12:33:54 +02:00
Martin Pepin
7f5a442bae Merge branch 'Aufinal/annul_reventes' into 'master'
Annulation des reventes

Closes #191

See merge request cof-geek/gestioCOF!297
2018-10-07 12:16:07 +02:00
Martin Pépin
9da9649a45 Use the syncmail command as defined in custommail 2018-10-07 00:55:54 +02:00
Martin Pépin
1f350d60dd Merge branch 'master' into Aufinal/annul_reventes 2018-10-07 00:34:36 +02:00
Aurélien Delobelle
26b19685b8 Merge branch 'Kerl/fix-pre-commit' into 'master'
Autre idée pour réparer le hook de pre-commit

See merge request cof-geek/gestioCOF!322
2018-10-07 00:09:13 +02:00
Martin Pépin
2c0ab1e55e use xargs to prevent globbing in pre-commit.sh 2018-10-07 00:06:51 +02:00
Martin Pepin
b86f3113ea Merge branch 'aureplop/bda-test_silence' into 'master'
bda.tests -- Silence syncmails in setup

See merge request cof-geek/gestioCOF!320
2018-10-06 17:47:54 +02:00
Aurélien Delobelle
aac9b41442 bda.tests -- Silence syncmails in setup 2018-10-06 17:39:52 +02:00
Martin Pepin
ec287c8a3b Merge branch 'aureplop/linters' into 'master'
core -- Add and apply black, flake8, isort to CI and pre-commit

Closes #200

See merge request cof-geek/gestioCOF!317
2018-10-06 16:10:33 +02:00
Aurélien Delobelle
fc4b852bde Merge branch 'Kerl/linters' into 'aureplop/linters'
Script de pre-commit plus robuste

See merge request cof-geek/gestioCOF!319
2018-10-06 16:04:36 +02:00
Martin Pépin
9bc3355a21 pre-commit hook: fix shellcheck's SC2086 & SC2181 2018-10-06 15:50:49 +02:00
Martin Pépin
61fbf0bc80 typo 2018-10-06 15:45:32 +02:00
Aurélien Delobelle
402b544393 core -- Fix flake8 errors 2018-10-06 13:15:33 +02:00
Aurélien Delobelle
fdd2b35289 core -- Apply black + isort to all files 2018-10-06 13:15:33 +02:00
Aurélien Delobelle
104e71dcf6 core -- Add black,isort,flake8 to CI and pre-commit hook
On CI:
- black and isort in check mode must pass.
- flake8 only prints errors
  WIP: make it also failed.

On pre-commit:
- black and isort will format staged files, if installed on path.
- flake8 prints its output if necessary.
2018-10-06 12:53:50 +02:00
Aurélien Delobelle
b23810917d core -- Remove not working cache of py installed packages...
... and use env var for pip install location.
2018-10-06 11:54:18 +02:00
Martin Pepin
b39b6d6bb3 Merge branch 'aureplop/cof-tests_registration' into 'master'
cof -- Add tests for registration views

See merge request cof-geek/gestioCOF!287
2018-10-06 11:25:44 +02:00
Aurélien Delobelle
dda803b7d5 Merge branch 'aureplop/ci-disable-coverage-in-gitlab' into 'master'
core -- Disable coverage in GitLab CI

See merge request cof-geek/gestioCOF!318
2018-10-06 10:14:35 +02:00
Aurélien Delobelle
cc4e3223b6 core -- Disable coverage in GitLab CI 2018-10-05 23:36:59 +02:00
Martin Pepin
39abfceb76 Merge branch 'aureplop/kfet-tests_perform_operations' into 'master'
kfet.tests -- Add tests for perform_operations view + small things

See merge request cof-geek/gestioCOF!313
2018-10-04 23:59:30 +02:00
Martin Pepin
56d979bb47 Merge branch 'aureplop/add-codecoverage-to-ci' into 'master'
core -- Add code coverage to CI

See merge request cof-geek/gestioCOF!314
2018-10-04 19:06:57 +02:00
Aurélien Delobelle
6c5b7ed5cc core -- Update CI badge for current GitLab version 2018-10-04 11:36:45 +02:00
Aurélien Delobelle
7e55bf0cb1 core -- Add code coverage to CI 2018-10-04 11:36:45 +02:00
Aurélien Delobelle
507a59c914 kfet.tests -- Add tests for perform_operations view 2018-10-04 11:25:10 +02:00
Aurélien Delobelle
22011faba9 kfet -- Init KFetConfig, even without request, for easy testing 2018-10-04 11:25:10 +02:00
Aurélien Delobelle
0f688a8f1c kfet -- Stack errors of KPsulOperationForm
Delete an error never raised, and avoid duplicate messages.
2018-10-04 11:25:10 +02:00
Aurélien Delobelle
93d3c124fd kfet -- Add fixme related to available checkouts in K-Psul 2018-10-04 11:25:10 +02:00
Martin Pepin
ec29e6ef5c Merge branch 'aureplop/kfet-tests_remove-unused-views' into 'master'
kfet -- Remove unused view

See merge request cof-geek/gestioCOF!312
2018-10-03 23:07:04 +02:00
Aurélien Delobelle
79c26c9dd6 kfet -- Remove unused view 2018-10-01 15:37:41 +02:00
Aurélien Delobelle
44af796e73 Merge branch 'Kerl/tests' into 'master'
Quelques tests pour les vues BdA

See merge request cof-geek/gestioCOF!280
2018-09-30 13:39:22 +02:00
Aurélien Delobelle
6858df02be bda.tests -- Use urllib urlencode 2018-09-30 13:22:22 +02:00
Aurélien Delobelle
3eb939928f Merge branch 'master' into Kerl/tests 2018-09-30 13:08:58 +02:00
Aurélien Delobelle
10f4bd02d5 Merge branch 'master' into aureplop/cof-tests_registration 2018-09-30 12:57:35 +02:00
Aurélien Delobelle
064c23902b cof.tests -- Address flake8 concerns 2018-09-30 12:56:58 +02:00
Aurélien Delobelle
44e5387f15 cof.tests -- Really check initial of built form 2018-09-30 12:56:36 +02:00
Martin Pépin
f297a1a0cf update hardcoded Mega views for 2018… 2018-09-09 07:20:18 +02:00
Martin Pépin
a750c62baf New year, new promotion: 2018 2018-09-02 23:27:21 +02:00
Martin Pépin
19c51c6a3a Merge branch 'Kerl/unernestaparis' 2018-09-02 23:27:05 +02:00
Martin Pépin
327ef210db make unernestaparis visible in forms 2018-09-02 23:26:18 +02:00
Martin Pépin
73cf39baa8 missing migration 2018-09-02 23:25:58 +02:00
Theo Delemazure
91393dcea7 Update models.py 2018-09-02 20:34:09 +02:00
Martin Pepin
a8bfedb28b Merge branch 'Kerl/ci-py35' into 'master'
Utilise python 3.5 dans l'intégration continue

See merge request cof-geek/gestioCOF!306
2018-09-02 18:24:24 +02:00
Martin Pepin
92ca838601 Merge branch 'Kerl/changeemail' into 'master'
Les membres peuvent changer leur adresse email

See merge request cof-geek/gestioCOF!305
2018-09-02 18:24:03 +02:00
Martin Pépin
66184fbee6 CI: set python version to 3.5 2018-08-05 18:34:05 +02:00
Martin Pépin
898a354c2d Members can change their registration email 2018-08-05 18:11:10 +02:00