Commit graph

284 commits

Author SHA1 Message Date
Martin Pepin
33b3d558b5 Merge branch 'Aufinal/decorators' into 'master'
Utilise les bons décorateurs

See merge request !195
2017-03-21 00:25:50 +01:00
Ludovic Stephan
5e802217fd Remove lambda operators 2017-03-20 20:24:44 -03:00
Martin Pepin
ae38b5d1e7 Merge branch 'hotfix/prevent_ldap_injection' into 'master'
Hotfix/prevent ldap injection

Closes #150

See merge request !188
2017-03-20 23:06:59 +01:00
Martin Pépin
59f57793ba typo 2017-03-20 22:05:48 +00:00
Martin Pépin
0aed975615 Fix the empty-query test in autocomplete
If there is no valid word to search in the LDAP database, no query is
performed. Since 74f0b63e, that behaviour was broken because of a typo
2017-03-20 08:14:20 +00:00
Ludovic Stephan
2c63e6b667 Use django.contrib.auth decorators 2017-03-20 00:11:50 -03:00
Martin Pépin
74f0b63e96 Change ldap query behaviour if multiple inputs
It is now consistent with the other lookups over the User database
2017-03-19 15:10:08 +00:00
Martin Pépin
dc50a23b10 Escape the content of the regex in highligh_text 2017-03-19 14:48:04 +00:00
Martin Pépin
4899bba1f7 Replace list comprehensions by iterators in dal 2017-03-19 14:05:25 +00:00
Ludovic Stephan
51fba4da21 Log messages 2017-03-18 19:02:08 -03:00
Ludovic Stephan
47b7d934e0 PEP8 on imports 2017-03-18 19:01:51 -03:00
Ludovic Stephan
29d7654052 Root kfet account 2017-03-18 18:02:33 -03:00
Ludovic Stephan
f512c1bdd7 Add better checkout creation 2017-03-18 18:02:23 -03:00
Martin Pépin
55b67f38c8 Notice the users about the α-numeric restriction
Add a help text above the two autocompletion inputs letting the users
know that non-alphanumeric characters will not be used.
2017-03-16 23:16:56 +00:00
Martin Pépin
741f0183e6 Prevent ldap injections in autocompletion views
We only allow alphanumeric characters in the query in order to avoid
injections
2017-03-16 22:43:43 +00:00
Martin Pépin
3acc8bca75 s/username/clipper in highlight_clipper
There was typo, the `Clipper` object has no `username` attribute. We
want to use the `clipper` attribute
2017-03-15 19:11:38 +00:00
Martin Pépin
e98a407982 Rename bits -> search_words in kfet.autocomplete
This is typo, this variable has not the same name in
`gestioncof.autocomplete` and `kfet.autocomplete`
2017-03-15 19:02:31 +00:00
Martin Pépin
d41d905366 PEP8 2017-02-11 21:20:51 +01:00
Martin Pépin
313b5cf61d Merge branch 'master' into Aufinal/dev_data_kfet 2017-02-11 21:01:37 +01:00
Martin Pépin
02a8e74e3b Optimize code, better queries
- Remove useless Q queries
- Optimize with sets
- Queries over clipper id too
2017-02-11 02:39:59 +01:00
Ludovic Stephan
9ade88d076 add stdout log 2017-02-08 15:54:49 -02:00
Ludovic Stephan
01dbf7293c withdrawals cost money 2017-02-08 15:38:59 -02:00
Ludovic Stephan
5ea9705528 use decimal 2017-02-08 15:38:27 -02:00
Ludovic Stephan
b692b92f74 correct return value for get_or_create 2017-02-08 15:33:35 -02:00
Ludovic Stephan
3b318cf623 correct timedelta 2017-02-08 15:31:10 -02:00
Ludovic Stephan
c6e84b8cb4 bug 2017-02-08 15:29:40 -02:00
Ludovic Stephan
4e62eb0aee create checkout dynamically 2017-02-08 15:26:56 -02:00
Ludovic Stephan
066df73b62 add different operation types 2017-02-08 15:11:38 -02:00
Ludovic Stephan
bb78091cc5 checkout fixture 2017-02-07 23:59:49 -02:00
Ludovic Stephan
8346dd65d1 dev data kfet 2017-02-07 23:22:31 -02:00
Ludovic Stephan
2013fec68b move fixtures 2017-02-07 18:42:31 -02:00
Martin Pépin
540b6f38b8 Merge branch 'master' into Kerl/ldap 2017-01-09 15:47:12 +01:00
Martin Pépin
703921a314 Supprime du code mort 2017-01-07 17:36:18 +01:00
Aurélien Delobelle
dd43f9d868 Merge branch 'Aufinal/previous_op' into 'k-fet'
Rappel de l'opération précédente sur K-Psul

Rajoute un champ d'informations sur la précédente opération validée (sur
la machine, pas sur le serveur) : valeur du panier et solde restant dans
le cas d'un utilisateur, et valeur du panier et rendus de monnaie dans
le cas d'une opération en liquide.

Fix #110

See merge request !146
2017-01-07 02:33:53 +01:00
Aurélien Delobelle
a34732cc9d ajouts supp. previous_op
- Le trigramme est obtenu à partir de ``account_data`` qui contient les
  données traitées et validées relatives au compte en train de commander.
- L'opération précédente disparaît en cas de ``hard reset``
2017-01-07 02:28:19 +01:00
Aurélien Delobelle
7ed9c90726 fix whitespaces 2017-01-07 01:56:33 +01:00
Aurélien Delobelle
86286b662a Merge branch 'Aufinal/search_icon' into k-fet
- Ajoute une icône de recherche dans K-Psul pour accéder à la liste des comptes
2017-01-07 01:12:13 +01:00
Aurélien Delobelle
1bae76a405 Merge branch 'Aufinal/arrondi_ukf' into k-fet
- Arrondis cohérents des UKF lors des divers affichages
- Remplace les arrondis par des floor pour éviter les négatifs de quelques
centimes

Fix #92

See merge request !124
2017-01-07 01:02:07 +01:00
Aurélien Delobelle
792c4177ec Merge branch 'master' into k-fet 2017-01-07 00:38:54 +01:00
Ludovic Stephan
c58ac3a904 Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/search_icon 2017-01-06 19:01:00 -02:00
Ludovic Stephan
a78a4393d0 Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/arrondi_ukf 2017-01-06 19:00:17 -02:00
Ludovic Stephan
20079c37e9 Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/previous_op 2017-01-06 18:20:54 +01:00
Aurélien Delobelle
e292318245 Fix WebSocket failure on K-Psul 2017-01-05 14:27:25 +01:00
Martin Pépin
bc5a323dfe Add missing migration 2017-01-04 15:29:28 +01:00
Michele Orrù
0b54972aa8 Add fixtures.
Create fixtures for kfet application:
- Add a bunch of non-cof profiles whose "last_name" is "Romain";
- Add k-fet articles using the real ones as a template;
- Add LIQ account;
- Add groups K-fet Chef and K-fet Girl;
- Add "caisse".
We also added some template for future tests (well, actually it's the script
used to generate the fixtures…).
2017-01-03 01:35:56 +01:00
Martin Pépin
01ce955784 Fixes
- Fixes bugs
- Removes useless scripts
2016-12-25 12:27:42 +01:00
Martin Pépin
3c7558c853 The end of Clipper
GestioCOF fetches the clipper accounts from an LDAP database and doesn't
need to store clippers in a table anymore.
2016-12-25 11:57:50 +01:00
Ludovic Stephan
b27a2d0720 mise en valeur du trigramme 2016-12-22 01:29:40 -02:00
Ludovic Stephan
5267a8a368 add previous op recap 2016-12-22 01:13:14 -02:00
Ludovic Stephan
38dbebb05e Merge branch 'Aufinal/arrondi_ukf' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/arrondi_ukf 2016-12-22 00:25:07 -02:00