Ajouter du javascript

Et ajout de la gestion du fichier des utilisateurs ajoutés en ligne
This commit is contained in:
2026-03-02 20:47:22 +01:00
parent 70a28837fe
commit ce87beb55a
6 changed files with 46 additions and 18 deletions

View File

@@ -1,10 +1,16 @@
_repertoire_identifiants_mot_de_passe= {
"Alban": "mot_de_passe",
}
def lecture():
with open('mots_de_passe_identifiants.txt','r') as f:
for ligne in f:
ligne = ligne.replace("\n","")
Identifiant,mot_de_passe=list(ligne.split(";;"))
_repertoire_identifiants_mot_de_passe[Identifiant]=mot_de_passe
return _repertoire_identifiants_mot_de_passe
def verif_user(Identifiant: str, Mot_de_passe: str) -> bool:
#
if _repertoire_identifiants_mot_de_passe.get(Identifiant, "Inconnu") == Mot_de_passe:
if lecture().get(Identifiant, "Inconnu") == Mot_de_passe:
return True
else:
return False