Skip to content
Snippets Groups Projects
Commit b891ef1c authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

cleaner offices

parent f846277e
No related branches found
No related tags found
No related merge requests found
{
"Algeco4": [
[
"Lalles",
"Ariane"
]
],
"B01": [
[
"Baudu",
"Dorian"
"Martinez-Fouché",
"Théo"
],
[
"Nguyen",
"Dinh Vinh Thanh"
"Roux",
"Constant"
]
],
"B02": [
[
"Flayols",
"Thomas"
],
[
"Wojciechowski",
"Krzysztof"
"Manhes",
"Jérôme"
]
],
"B03": [
......@@ -31,9 +31,17 @@
[
"Pomarat",
"Zoé"
],
[
"Wojciechowski",
"Krzysztof"
]
],
"B04": [
[
"Bousquet",
"Thomas"
],
[
"Chalabi",
"Kahina"
......@@ -56,6 +64,10 @@
"Hadj Sassi",
"Sonia-Laure"
],
[
"Lalles",
"Ariane"
],
[
"Perrot",
"Côme"
......@@ -63,12 +75,12 @@
],
"B08": [
[
"Flayols",
"Thomas"
"Mirabel",
"Joseph"
],
[
"Martinez-Fouché",
"Théo"
"Stepien",
"Maciej"
],
[
"Subburaman",
......@@ -76,64 +88,48 @@
]
],
"B10": [
[
"Bernat",
"Loan"
],
[
"Chane-Sane",
"Elliot"
],
[
"Fernbach",
"Pierre"
"D'Haene",
"Mathis"
],
[
"Lasguignes",
"Thibaud"
"Fernbach",
"Pierre"
],
[
"Marsan",
"Thibault"
"Saurel",
"Guilhem"
]
],
"B114": [
[
"Albrecht",
"Niels"
],
[
"Barthe",
"Loic"
],
[
"Bories",
"Maxime"
],
[
"Bousquet",
"Thomas"
],
[
"Jeannot",
"Thibault"
],
[
"Lutz",
"Victor"
],
[
"Parent",
"Laure"
"Tirel",
"Laurine"
]
],
"B16": [
[
"Lamiraux",
"Florent"
]
],
"B17": [
],
[
"Taix",
"Michel"
],
]
],
"B17": [
[
"Watier",
"Bruno"
......@@ -157,10 +153,22 @@
"Nicolas"
]
],
"G57SalleCAO": [
"B24": [
[
"Dollat",
"Xavier"
]
],
"B29": [
[
"Corbin",
"Thony"
]
],
"B30": [
[
"Gnanguessim",
"Diskouna"
"Medioni",
"Hugo"
]
]
}
\ No newline at end of file
}
......@@ -29,11 +29,13 @@ MAP_POSITIONS = [
("B18", 460, 420, 650, 598, -350),
("B17", 460, 608, 650, 785, -350),
("B16", 460, 793, 650, 966, -350),
("B11", 1410, 250, 1670, 441, 400),
("B10", 1410, 450, 1670, 691, 400),
("B08", 1410, 700, 1670, 925, 400),
("B06", 1410, 932, 1670, 1161, 400),
("B04", 1410, 1453, 1670, 1647, 400),
("B03", 1410, 1656, 1670, 1834, 400),
("B02", 1410, 1843, 1670, 2012, 400),
("B01", 1410, 2021, 1670, 2202, 400),
]
......@@ -97,14 +99,14 @@ class Offices:
# Stuff that is wrong in LDAP… We should fix that there
WRONG_OFFICE = {
"B04": {
("Vincent", "Bonnet"),
"B11": {
("Fadi", "Gebrayel"),
},
"B10": {
("Guilhem", "Saurel"),
"B17": {
("Aurore", "Bonnet-Lebrun"),
},
"Exterieur": {
("Ariane", "Lalles"),
"B18": {
("Vianney", "Monnier"),
},
}
WRONG_OFFICE = {
......@@ -112,13 +114,7 @@ WRONG_OFFICE = {
}
# Fix unicode from LDAP data…
ALIAS = {
"B08": [
(
{Gepettist("Leziart", "Pierre-Alexandre")},
{Gepettist("Léziart", "Pierre-Alexandre")},
)
],
"B17": [({Gepettist("Taix", "Michel")}, {Gepettist("Taïx", "Michel")})],
"B16": [({Gepettist("Taix", "Michel")}, {Gepettist("Taïx", "Michel")})],
"B19": [({Gepettist("Soueres", "Philippe")}, {Gepettist("Souères", "Philippe")})],
}
......@@ -166,7 +162,9 @@ def offices_ldap():
conn = Connection("ldap.laas.fr", auto_bind=True)
conn.search(
"dc=laas,dc=fr",
"(laas-mainGroup=gepetto)",
"(&(|"
+ "".join(f"(laas-mainGroup={g})" for g in ("gepetto", "idea", "i2c"))
+ ")(roomNumber=B*))",
attributes=["sn", "givenName", "roomNumber", "st"],
)
offices = Offices()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment