Ajouter du javascript
Et ajout de la gestion du fichier des utilisateurs ajoutés en ligne
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user