mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 03:13:12 +00:00
Merge branch 'dev' of https://gitlab.federez.net/re2o/re2o into new_radius_api
This commit is contained in:
commit
a5ece90335
5 changed files with 142 additions and 48 deletions
86
.mailmap
Normal file
86
.mailmap
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
Gabriel Detraz <chirac@crans.org> <detraz@crans.org>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <chirac@crans.org>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <chirac@arachne>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <chirac@re2o-test.auro.re>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <chirac@federez.net>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <chirac@raspberrypi>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <detraz@re2o-test.crans.org>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <detraz@re2o.adm.crans.org>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <chibrac@re2o-server.crans.org>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <detraz@crans.crans.org>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <chirac@re2o-server.crans.org>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <chirac@hydra>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <chirac@re2o-bcfg2.adm.crans.org>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <detrazcrans.org>
|
||||||
|
Gabriel Detraz <chirac@crans.org> <detraz@vo.crans.org>
|
||||||
|
Maël Kervella <kervella.mael@gmail.com>
|
||||||
|
Maël Kervella <kervella.mael@gmail.com> <dev@maelkervella.eu>
|
||||||
|
Maël Kervella <kervella.mael@gmail.com> <mael.kervella@supelec.fr>
|
||||||
|
Jean-Romain Garnier <jean-romain.garnier@supelec.fr>
|
||||||
|
Jean-Romain Garnier <jean-romain.garnier@supelec.fr> <git@jean-romain.com>
|
||||||
|
Hugo Levy-Falk <hugo@klafyvel.me> <hugo.levy--falk@supelec.fr>
|
||||||
|
Hugo Levy-Falk <hugo@klafyvel.me> <klafyvel@gmail.com>
|
||||||
|
Hugo Levy-Falk <hugo@klafyvel.me> <klafyvel@klafyvel.me>
|
||||||
|
Hugo Levy-Falk <hugo@klafyvel.me> <klafyvel@federez.net>
|
||||||
|
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@crans.org>
|
||||||
|
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@re2o-server.crans.org>
|
||||||
|
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@re2o-test.crans.org>
|
||||||
|
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@re2o.adm.crans.org>
|
||||||
|
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@nazgul.rezometz.org>
|
||||||
|
Arthur Grisel-Davy <grisel-davy@crans.org> <grisel-davy@re2o-test.auro.re>
|
||||||
|
Arthur Grisel-Davy <grisel-davy@crans.org> <grizzly@crans.org>
|
||||||
|
Arthur Grisel-Davy <grisel-davy@crans.org> <grizzly@raspberrypi>
|
||||||
|
Lara Kermarec <lhark@lharktop> <lhark@lharktop>
|
||||||
|
Lara Kermarec <lhark@lharktop> <lhark@arachne>
|
||||||
|
Lara Kermarec <lhark@lharktop> <lhark@pwc>
|
||||||
|
Lara Kermarec <lhark@lharktop> <goulven.kermarec@supelec.fr>
|
||||||
|
Lara Kermarec <lhark@lharktop> <lhark@federez-test>
|
||||||
|
Lara Kermarec <lhark@lharktop> <lhark@hydra>
|
||||||
|
Augustin Lemesle <augustin.lemesle@supelec.fr> <augustin.lemesle@supelec.fr>
|
||||||
|
Augustin Lemesle <augustin.lemesle@supelec.fr> <Dalahro@arachne>
|
||||||
|
Corentin Canebier <corentin@canebier.fr>
|
||||||
|
Corentin Canebier <corentin@canebier.fr> <corentin.canebier@student-cs.fr>
|
||||||
|
Root `root` Root <root@arachne>
|
||||||
|
Root `root` Root <root@arachne> <root@hydra.rezometz.org>
|
||||||
|
Root `root` Root <root@arachne> <root@federez-test.crans.org>
|
||||||
|
Root `root` Root <root@arachne> <root@gorgoroth>
|
||||||
|
Root `root` Root <root@arachne> <root@raspberrypi>
|
||||||
|
Root `root` Root <root@arachne> <root@nevrast>
|
||||||
|
Root `root` Root <root@arachne> <root@pwc>
|
||||||
|
Root `root` Root <root@arachne> <root@federez.net>
|
||||||
|
Root `root` Root <root@arachne> <root@hydra>
|
||||||
|
Root `root` Root <root@arachne> <root@morgoth.rez>
|
||||||
|
Root `root` Root <root@arachne> <root@re2o-server.crans.org>
|
||||||
|
Yoann Piétri <me@nanoy.fr>
|
||||||
|
Yoann Piétri <me@nanoy.fr> <yoann.pietri@supelec.fr>
|
||||||
|
Guillaume Goessel <rezo@guimoz.fr>
|
||||||
|
Guillaume Goessel <rezo@guimoz.fr> <guillaume.goessel@supelec.fr>
|
||||||
|
Guillaume Goessel <rezo@guimoz.fr> <guillaume.goessel@hotmail.com>
|
||||||
|
Guillaume Goessel <rezo@guimoz.fr> <me+federez@guimoz.fr>
|
||||||
|
David Sinquin <david.RezoMetz@sinquin.eu>
|
||||||
|
David Sinquin <david.RezoMetz@sinquin.eu> <david.rezo@sinquin.eu>
|
||||||
|
David Sinquin <david.RezoMetz@sinquin.eu> <david.federez.ldap@sinquin.eu>
|
||||||
|
Matthieu Michelet <matthieu.michelet@supelec.fr>
|
||||||
|
Matthieu Michelet <matthieu.michelet@supelec.fr> <michelet.matthieu@supelec.fr>
|
||||||
|
Jean-Marie Mineau <mineau.jean.marie@gmail.com>
|
||||||
|
~anonymised~ <sellem+re2o@crans.org>
|
||||||
|
~anonymised~ <sellem+re2o@crans.org> <sellem@crans.org>
|
||||||
|
Thibault de Boutray <me@thibaultdeboutray.pro>
|
||||||
|
Thibault de Boutray <me@thibaultdeboutray.pro> <thibaultdeboutray@gmail.com>
|
||||||
|
Fardale <fardale+git@crans.org>
|
||||||
|
Fardale <fardale+git@crans.org> <arrighi@crans.org>
|
||||||
|
Laouen Fernet <laouen.fernet@supelec.fr>
|
||||||
|
Laouen Fernet <laouen.fernet@supelec.fr> FERNET Laouen <laouen.fernet@supelec.fr>
|
||||||
|
Bombar Maxime <bombar@crans.org>
|
||||||
|
Leïla Bekaddour <leila.bekaddour@student-cs.fr>
|
||||||
|
Leïla Bekaddour <leila.bekaddour@student-cs.fr> <leila@ec-mac-cr-sho.home>
|
||||||
|
edpibu <edpibu@crans.org>
|
||||||
|
edpibu <edpibu@crans.org> <edpibu@re2o-test.crans.org>
|
||||||
|
Éloi Alain <eloi.alain@supelec.fr>
|
||||||
|
Éloi Alain <eloi.alain@supelec.fr> <eloi.alain@metz.supelec.fr>
|
||||||
|
Gabriel Le Bouder <lebouder@crans.org>
|
||||||
|
Gabriel Le Bouder <lebouder@crans.org> <lebouder@re2o-server.crans.org>
|
||||||
|
Charlie Jacomme <jacomme@crans.org>
|
||||||
|
Charlie Jacomme <jacomme@crans.org> <jacomme@crans.org>
|
||||||
|
Benjamin Graillot <graillot@crans.org>
|
||||||
|
Benjamin Graillot <graillot@crans.org> <graillot@crans.org>
|
|
@ -30,15 +30,16 @@ sudo pip3 install -r pip_requirements.txt
|
||||||
python3 manage.py collectstatic
|
python3 manage.py collectstatic
|
||||||
```
|
```
|
||||||
|
|
||||||
### MR 589: Move ldap to optional app
|
### MR 589: Move LDAP to optional app
|
||||||
|
|
||||||
Add `ldap_sync` to your optional apps in your local settings if you want to keep using the LDAP synchronisation.
|
Add `ldap_sync` to your optional apps in your local settings (`re2o/settings_local.py`) if you want to keep using the LDAP synchronisation.
|
||||||
|
|
||||||
### Final steps
|
### Final steps
|
||||||
|
|
||||||
As usual, run the following commands after updating:
|
As usual, run the following commands after updating:
|
||||||
```bash
|
```bash
|
||||||
python3 manage.py migrate
|
python3 manage.py migrate
|
||||||
|
python3 manage.py compilemessages
|
||||||
sudo service apache2 reload
|
sudo service apache2 reload
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -60,7 +61,7 @@ Here is a list of noteworthy features brought by this update:
|
||||||
* [!578](https://gitlab.federez.net/re2o/re2o/-/merge_requests/578) : Migrations squashed to ease the installation process.
|
* [!578](https://gitlab.federez.net/re2o/re2o/-/merge_requests/578) : Migrations squashed to ease the installation process.
|
||||||
* [!582](https://gitlab.federez.net/re2o/re2o/-/merge_requests/582): Improve autocomplete fields so they load faster and have a clearer behavior (no more entering a value without clicking and thinking it was taken into account).
|
* [!582](https://gitlab.federez.net/re2o/re2o/-/merge_requests/582): Improve autocomplete fields so they load faster and have a clearer behavior (no more entering a value without clicking and thinking it was taken into account).
|
||||||
* [!589](https://gitlab.federez.net/re2o/re2o/-/merge_requests/589): Move LDAP to a separate optional app.
|
* [!589](https://gitlab.federez.net/re2o/re2o/-/merge_requests/589): Move LDAP to a separate optional app.
|
||||||
* Plenty of bux fixes.
|
* Plenty of bug fixes.
|
||||||
|
|
||||||
You can view the full list of closed issues [here](https://gitlab.federez.net/re2o/re2o/-/issues?scope=all&state=all&milestone_title=Re2o 2.9).
|
You can view the full list of closed issues [here](https://gitlab.federez.net/re2o/re2o/-/issues?scope=all&state=all&milestone_title=Re2o 2.9).
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,8 @@ from preferences.models import CotisationsOption
|
||||||
from machines.models import regen
|
from machines.models import regen
|
||||||
from re2o.field_permissions import FieldPermissionModelMixin
|
from re2o.field_permissions import FieldPermissionModelMixin
|
||||||
from re2o.mixins import AclMixin, RevMixin
|
from re2o.mixins import AclMixin, RevMixin
|
||||||
|
import users.signals
|
||||||
|
import users.models
|
||||||
|
|
||||||
from cotisations.utils import find_payment_method, send_mail_invoice, send_mail_voucher
|
from cotisations.utils import find_payment_method, send_mail_invoice, send_mail_voucher
|
||||||
from cotisations.validators import check_no_balance
|
from cotisations.validators import check_no_balance
|
||||||
|
@ -356,7 +358,7 @@ def facture_post_save(**kwargs):
|
||||||
if facture.valid:
|
if facture.valid:
|
||||||
user = facture.user
|
user = facture.user
|
||||||
user.set_active()
|
user.set_active()
|
||||||
user.ldap_sync(base=False, access_refresh=True, mac_refresh=False)
|
users.signals.synchronise.send(sender=users.models.User, instance=user, base=False, access_refresh=True, mac_refresh=False)
|
||||||
|
|
||||||
|
|
||||||
@receiver(post_delete, sender=Facture)
|
@receiver(post_delete, sender=Facture)
|
||||||
|
@ -365,7 +367,7 @@ def facture_post_delete(**kwargs):
|
||||||
Synchronise the LDAP user after an invoice has been deleted.
|
Synchronise the LDAP user after an invoice has been deleted.
|
||||||
"""
|
"""
|
||||||
user = kwargs["instance"].user
|
user = kwargs["instance"].user
|
||||||
user.ldap_sync(base=False, access_refresh=True, mac_refresh=False)
|
users.signals.synchronise.send(sender=users.models.User, instance=user, base=False, access_refresh=True, mac_refresh=False)
|
||||||
|
|
||||||
|
|
||||||
class CustomInvoice(BaseInvoice):
|
class CustomInvoice(BaseInvoice):
|
||||||
|
@ -661,7 +663,7 @@ def vente_post_save(**kwargs):
|
||||||
purchase.cotisation.save()
|
purchase.cotisation.save()
|
||||||
user = purchase.facture.facture.user
|
user = purchase.facture.facture.user
|
||||||
user.set_active()
|
user.set_active()
|
||||||
user.ldap_sync(base=True, access_refresh=True, mac_refresh=False)
|
users.signals.synchronise.send(sender=users.models.User, instance=user, base=True, access_refresh=True, mac_refresh=False)
|
||||||
|
|
||||||
|
|
||||||
# TODO : change vente to purchase
|
# TODO : change vente to purchase
|
||||||
|
@ -677,7 +679,7 @@ def vente_post_delete(**kwargs):
|
||||||
return
|
return
|
||||||
if purchase.type_cotisation:
|
if purchase.type_cotisation:
|
||||||
user = invoice.user
|
user = invoice.user
|
||||||
user.ldap_sync(base=False, access_refresh=True, mac_refresh=False)
|
users.signals.synchronise.send(sender=users.models.User, instance=user, base=True, access_refresh=True, mac_refresh=False)
|
||||||
|
|
||||||
|
|
||||||
class Article(RevMixin, AclMixin, models.Model):
|
class Article(RevMixin, AclMixin, models.Model):
|
||||||
|
|
|
@ -58,6 +58,7 @@ from netaddr import (
|
||||||
|
|
||||||
import preferences.models
|
import preferences.models
|
||||||
import users.models
|
import users.models
|
||||||
|
import users.signals
|
||||||
from re2o.field_permissions import FieldPermissionModelMixin
|
from re2o.field_permissions import FieldPermissionModelMixin
|
||||||
from re2o.mixins import AclMixin, RevMixin
|
from re2o.mixins import AclMixin, RevMixin
|
||||||
|
|
||||||
|
@ -2541,7 +2542,7 @@ class OuverturePort(RevMixin, AclMixin, models.Model):
|
||||||
def machine_post_save(**kwargs):
|
def machine_post_save(**kwargs):
|
||||||
"""Synchronise LDAP and regen firewall/DHCP after a machine is edited."""
|
"""Synchronise LDAP and regen firewall/DHCP after a machine is edited."""
|
||||||
user = kwargs["instance"].user
|
user = kwargs["instance"].user
|
||||||
user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
users.signals.synchronise.send(sender=users.models.User, instance=user, base=False, access_refresh=False, mac_refresh=True)
|
||||||
regen("dhcp")
|
regen("dhcp")
|
||||||
regen("mac_ip_list")
|
regen("mac_ip_list")
|
||||||
|
|
||||||
|
@ -2551,7 +2552,7 @@ def machine_post_delete(**kwargs):
|
||||||
"""Synchronise LDAP and regen firewall/DHCP after a machine is deleted."""
|
"""Synchronise LDAP and regen firewall/DHCP after a machine is deleted."""
|
||||||
machine = kwargs["instance"]
|
machine = kwargs["instance"]
|
||||||
user = machine.user
|
user = machine.user
|
||||||
user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
users.signals.synchronise.send(sender=users.models.User, instance=user, base=False, access_refresh=False, mac_refresh=True)
|
||||||
regen("dhcp")
|
regen("dhcp")
|
||||||
regen("mac_ip_list")
|
regen("mac_ip_list")
|
||||||
|
|
||||||
|
@ -2564,7 +2565,7 @@ def interface_post_save(**kwargs):
|
||||||
interface = kwargs["instance"]
|
interface = kwargs["instance"]
|
||||||
interface.sync_ipv6()
|
interface.sync_ipv6()
|
||||||
user = interface.machine.user
|
user = interface.machine.user
|
||||||
user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
users.signals.synchronise.send(sender=users.models.User, instance=user, base=False, access_refresh=False, mac_refresh=True)
|
||||||
# Regen services
|
# Regen services
|
||||||
regen("dhcp")
|
regen("dhcp")
|
||||||
regen("mac_ip_list")
|
regen("mac_ip_list")
|
||||||
|
@ -2580,7 +2581,7 @@ def interface_post_delete(**kwargs):
|
||||||
"""
|
"""
|
||||||
interface = kwargs["instance"]
|
interface = kwargs["instance"]
|
||||||
user = interface.machine.user
|
user = interface.machine.user
|
||||||
user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
users.signals.synchronise.send(sender=users.models.User, instance=user, base=False, access_refresh=False, mac_refresh=True)
|
||||||
|
|
||||||
|
|
||||||
@receiver(post_save, sender=IpType)
|
@receiver(post_save, sender=IpType)
|
||||||
|
|
|
@ -4,40 +4,44 @@ A list of the proud contributors to Re2o
|
||||||
"""
|
"""
|
||||||
|
|
||||||
CONTRIBUTORS = [
|
CONTRIBUTORS = [
|
||||||
"Gabriel 'chibrac' Detraz",
|
'Gabriel Detraz',
|
||||||
"Hugo 'klafyvel' Levy-Falk",
|
'Hugo Levy-falk',
|
||||||
"Maël 'MoaMoaK' Kervella",
|
'Maël Kervella',
|
||||||
"Arthur 'Grizzly' Grisel-Davy",
|
'Jean-romain Garnier',
|
||||||
"Augustin 'Dalahro' Lemesle",
|
'Arthur Grisel-davy',
|
||||||
"Laouen 'volgarr' Fernet",
|
'Laouen Fernet',
|
||||||
"Lara 'lhark' Kermarec",
|
'Augustin Lemesle',
|
||||||
"Alexandre 'erdnaxe' Ioss",
|
'Lara Kermarec',
|
||||||
"Charlie Jacomme",
|
'Root `root` Root',
|
||||||
"Root 'root' Root",
|
'Alexandre Iooss',
|
||||||
"Yoann 'nanoy' Pietri",
|
'Yoann Piétri',
|
||||||
"Maxime Bombar",
|
'Charlie Jacomme',
|
||||||
"Matthieu 'lebanni' Michelet",
|
'Corentin Canebier',
|
||||||
"Guillaume 'guimoz' Goessel",
|
'Bombar Maxime',
|
||||||
"edpibu",
|
'Guillaume Goessel',
|
||||||
"Jean-Romain 'lerennais' Garnier",
|
'Matthieu Michelet',
|
||||||
"David '5-1' Sinquin",
|
'Edpibu',
|
||||||
"Gabriel Le Bouder",
|
'Fardale',
|
||||||
"Fardale",
|
'Jean-marie Mineau',
|
||||||
"Éloi Alain",
|
'David Sinquin',
|
||||||
"Simon Brelivet",
|
'Gabriel Le Bouder',
|
||||||
"Antoine Vintache",
|
'Simon Brélivet',
|
||||||
"Benjamin Graillot",
|
'~anonymised~',
|
||||||
"Thibault 'tipunchetrhum' Deboutray",
|
'Benjamin Graillot',
|
||||||
"Joanne Steiner",
|
'Leïla Bekaddour',
|
||||||
"Delphine Salvy",
|
'Éloi Alain',
|
||||||
"Pierre Cadart",
|
'Pierre Cadart',
|
||||||
"'Krokmou'",
|
'Antoine Vintache',
|
||||||
"Vincent Le Gallic",
|
'Thibault De Boutray',
|
||||||
"Hugo 'shaka' Hervieux",
|
'Delphine Salvy',
|
||||||
"Pierre-Antoine Comby",
|
'Joanne Steiner',
|
||||||
"Nymous",
|
'Krokmou',
|
||||||
"Mikachu",
|
'B',
|
||||||
"Baptiste 'B' Fournier",
|
'Daniel Stan',
|
||||||
"Gwenael Le Hir",
|
'Gwenael Le Hir',
|
||||||
"Daniel Stan",
|
'Hugo Hervieux',
|
||||||
]
|
'Mikachu',
|
||||||
|
'Nymous',
|
||||||
|
'Pierre-antoine Comby',
|
||||||
|
'Vincent Le Gallic',
|
||||||
|
]
|
Loading…
Reference in a new issue