07/07/23 - 16h
parent
91ed61726d
commit
ae9218fddf
|
@ -1,12 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="05/07/23 - 12h">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="05/07/23 - 20h">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Attestation_Certificat.py" beforeDir="false" afterPath="$PROJECT_DIR$/Attestation_Certificat.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/data_indexees.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data_indexees.csv" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" beforeDir="false" afterPath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/data_indexees.csv" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ela_user_account.py" beforeDir="false" afterPath="$PROJECT_DIR$/ela_user_account.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/email_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/emargement.py" beforeDir="false" afterPath="$PROJECT_DIR$/emargement.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/partners.py" beforeDir="false" afterPath="$PROJECT_DIR$/partners.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -343,7 +351,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1688551284399</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="40" />
|
||||
<task id="LOCAL-00040" summary="05/07/23 - 20h">
|
||||
<created>1688579855150</created>
|
||||
<option name="number" value="00040" />
|
||||
<option name="presentableId" value="LOCAL-00040" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1688579855150</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="41" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -358,7 +373,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="25/04/23 - 21h" />
|
||||
<MESSAGE value="28/04/23 - 21h" />
|
||||
<MESSAGE value="29/04/23 - 21h" />
|
||||
<MESSAGE value="05/05/23 - 21h" />
|
||||
|
@ -383,6 +397,7 @@
|
|||
<MESSAGE value="04/07/23 - 10h" />
|
||||
<MESSAGE value="04/07/23 - 17h" />
|
||||
<MESSAGE value="05/07/23 - 12h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="05/07/23 - 12h" />
|
||||
<MESSAGE value="05/07/23 - 20h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="05/07/23 - 20h" />
|
||||
</component>
|
||||
</project>
|
|
@ -47,6 +47,12 @@ def GetPartnerAttestation_Certificat(diction):
|
|||
if diction['token']:
|
||||
mytoken = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", mytoken)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(mytoken)
|
||||
if (partner_recid is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " Impossible de recuperer la liste des attestations ")
|
||||
|
@ -93,7 +99,10 @@ def GetSpecificPartnerAttestation_Certificat(diction):
|
|||
if diction['token']:
|
||||
mytoken = diction['token']
|
||||
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", mytoken)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(mytoken)
|
||||
if (partner_recid is False):
|
||||
|
|
|
@ -270,6 +270,12 @@ def UpdateStagiairetoClass(diction):
|
|||
mytoken = str(diction['token']).strip()
|
||||
#query_key['token'] = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", mytoken)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
myemail = ""
|
||||
if ("email" in diction.keys()):
|
||||
if diction['email']:
|
||||
|
@ -634,6 +640,12 @@ def GetAllClassStagiaire(diction):
|
|||
if diction['token']:
|
||||
mytoken = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", mytoken)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(mytoken)
|
||||
if (partner_recid is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer la liste des stagiaires, ")
|
||||
|
@ -668,7 +680,7 @@ def GetAllClassStagiaire(diction):
|
|||
RetObject = []
|
||||
val_tmp = 1
|
||||
|
||||
#print(" #### myquery = "+str(myquery))
|
||||
print(" #### myquery 01= "+str(myquery))
|
||||
|
||||
for retval in coll_session.find(myquery):
|
||||
user = retval
|
||||
|
@ -708,6 +720,11 @@ def SendInscriptionConfirmation(diction):
|
|||
if diction['token']:
|
||||
mytoken = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", mytoken)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(mytoken)
|
||||
if (partner_recid is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer le recid du partenaire")
|
||||
|
@ -1383,7 +1400,7 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
# Ici on doit mettre tous les champs possible (obligatoire ou non) de la BDD dans la liste
|
||||
# field_list.
|
||||
'''
|
||||
field_list = ['token','session_id']
|
||||
field_list = ['token','session_id', 'class_internal_url']
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list:
|
||||
|
@ -1394,7 +1411,7 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
Une fois qu'on a controlé que toutes les clés mise dans l'API sont correcte. etape precedente,
|
||||
On controle que les champs obligatoires sont presents dans la liste
|
||||
'''
|
||||
field_list_obligatoire = ['token', 'session_id']
|
||||
field_list_obligatoire = ['token', 'session_id', 'class_internal_url']
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
|
@ -1406,11 +1423,33 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
session_id = ""
|
||||
if ("session_id" in diction.keys()):
|
||||
if diction['session_id']:
|
||||
session_id = diction['session_id']
|
||||
|
||||
class_internal_url = ""
|
||||
if ("class_internal_url" in diction.keys()):
|
||||
if diction['class_internal_url']:
|
||||
class_internal_url = diction['class_internal_url']
|
||||
|
||||
|
||||
# Verification de l'existance de la formation (class_internal_url)
|
||||
tmp_count = MYSY_GV.dbname['myclass'].count_documents({'internal_url': str(class_internal_url), 'valide': '1', 'locked':'0'})
|
||||
|
||||
# logging.info(" TMP = "+str(tmp))
|
||||
if (tmp_count <= 0):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(class_internal_url) + " : ' Cette formation n'est pas valide ")
|
||||
return False, " Cette formation n'est pas valide "
|
||||
|
||||
|
||||
|
||||
if(len(str(session_id).strip()) <= 0 ):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " La session de formation est vide : Impossible d'importer la liste des participants ")
|
||||
|
@ -1465,7 +1504,7 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
3]) + " : Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire")
|
||||
return False, " Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire "
|
||||
|
||||
|
||||
"""
|
||||
# Recuperation des info de la session.
|
||||
session_data = MYSY_GV.dbname['session_formation'].find_one({'formation_session_id':str(session_id)})
|
||||
if( session_data is None ):
|
||||
|
@ -1475,7 +1514,7 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
return False, "la session de formation n'existe pas. Impossible d'importer la liste des participants"
|
||||
|
||||
#print(" #### session_data = ",session_data)
|
||||
|
||||
"""
|
||||
x = range(0, total_rows)
|
||||
for n in x:
|
||||
mydata = {}
|
||||
|
@ -1511,7 +1550,7 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
if( str(df['status'].values[n]).strip() == "1"):
|
||||
mydata['inscription_validation_date'] = str(datetime.now().strftime("%d/%m/%Y %H:%M:%S"))
|
||||
|
||||
mydata['class_internal_url'] = str(session_data['class_internal_url'])
|
||||
mydata['class_internal_url'] = str(class_internal_url)
|
||||
|
||||
|
||||
local_price = str(df['prix'].values[n]).strip()
|
||||
|
@ -1926,6 +1965,12 @@ def SendTrainingEvaluationEmail(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
# Recuperation du recid du partenaire
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(str(my_token))
|
||||
if partner_recid is False:
|
||||
|
@ -2065,6 +2110,12 @@ def SendAttendeeCertification(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
# Recuperation du recid du partenaire
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(str(my_token))
|
||||
if partner_recid is False:
|
||||
|
@ -2488,6 +2539,12 @@ def GetListEvaluation_Session(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
# Recuperation du recid du partenaire
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(str(my_token))
|
||||
if partner_recid is False:
|
||||
|
@ -2563,6 +2620,11 @@ def CancelAttendeeInscription(diction):
|
|||
if diction['token']:
|
||||
mytoken = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", mytoken)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(mytoken)
|
||||
if (partner_recid is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer le recid du partenaire")
|
||||
|
|
2410
Log/log_file.log
2410
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -72,6 +72,13 @@ def Add_Update_SessionFormation(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
|
||||
code_session = ""
|
||||
if ("code_session" in diction.keys()):
|
||||
mydata['code_session'] = diction['code_session']
|
||||
|
@ -329,6 +336,11 @@ def GetSessionFormation(diction):
|
|||
if diction['token']:
|
||||
mytoken = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", mytoken)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(mytoken)
|
||||
if (partner_recid is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer la liste des stagiaires, ")
|
||||
|
@ -538,6 +550,12 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
class_internal_url = ""
|
||||
if ("class_internal_url" in diction.keys()):
|
||||
if diction['class_internal_url']:
|
||||
|
|
|
@ -2139,6 +2139,13 @@ def get_partner_class(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
|
||||
'''
|
||||
Gestion des filters.
|
||||
'''
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
,index,mots,occurence,moyenne,id_formation,source_field
|
||||
0,0,integrative,1,0.33,MYSY_Test_AR,title
|
||||
1,1,aromatherapie,1,0.33,MYSY_Test_AR,title
|
||||
2,2,praticien,1,0.33,MYSY_Test_AR,title
|
|
|
@ -1,4 +0,0 @@
|
|||
mots occurence moyenne id_formation source_field
|
||||
0 integrative 1 0.33 MYSY_Test_AR title
|
||||
1 aromatherapie 1 0.33 MYSY_Test_AR title
|
||||
2 praticien 1 0.33 MYSY_Test_AR title
|
|
@ -1722,7 +1722,7 @@ def InitUserPasswd(diction):
|
|||
# Ici on doit mettre tous les champs possible (obligatoire ou non) de la BDD dans la liste
|
||||
# field_list.
|
||||
'''
|
||||
field_list = ['email', 'secrete']
|
||||
field_list = ['email', 'account_type']
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list:
|
||||
|
@ -1734,7 +1734,7 @@ def InitUserPasswd(diction):
|
|||
Une fois qu'on a controlé que toutes les clés mise dans l'API sont correcte. etape precedente,
|
||||
On controle que les champs obligatoires sont presents dans la liste
|
||||
'''
|
||||
field_list_obligatoire = ['email']
|
||||
field_list_obligatoire = ['email', 'account_type']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
|
@ -1745,18 +1745,20 @@ def InitUserPasswd(diction):
|
|||
Verification de la valider de l'email
|
||||
'''
|
||||
myemail = ""
|
||||
mysecrete = ""
|
||||
account_type = ""
|
||||
myquery = {}
|
||||
if ("email" in diction.keys()):
|
||||
if diction['email']:
|
||||
myemail = diction['email']
|
||||
myquery['email'] = diction['email']
|
||||
|
||||
if ("secrete" in diction.keys()):
|
||||
if diction['secrete']:
|
||||
mysecrete = diction['secrete']
|
||||
myquery['secret_key'] = diction['secrete']
|
||||
if ("account_type" in diction.keys()):
|
||||
if diction['account_type']:
|
||||
account_type = diction['account_type']
|
||||
|
||||
if( account_type not in ['partner', 'user']):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + "Le type de compte "+str(account_type)+" est inconnu ")
|
||||
return False, "Impossible de reinitialiser le mot de passe de l'utiilisateur. Le type de compte est inconnu"
|
||||
|
||||
myquery['active'] = '1'
|
||||
myquery['locked'] = '0'
|
||||
|
@ -1764,7 +1766,10 @@ def InitUserPasswd(diction):
|
|||
'''
|
||||
Si le champs "secrete" est vide, alors il s'agit d'un compte utilisateur classique
|
||||
'''
|
||||
if( mysecrete == ""):
|
||||
if( account_type == "user"):
|
||||
'''
|
||||
Le champs "account_type" est un user
|
||||
'''
|
||||
coll_name = MYSY_GV.dbname['user_account']
|
||||
|
||||
print(" myquery ="+str(myquery))
|
||||
|
@ -1823,9 +1828,9 @@ def InitUserPasswd(diction):
|
|||
|
||||
return True, "La demande de reinitiation à été prise en compte"
|
||||
|
||||
elif( len(mysecrete) > 0):
|
||||
elif( account_type == "partner"):
|
||||
'''
|
||||
Le champs "secrete" est rempli, alors on reinitialise le pwd d'un partenaire
|
||||
Le champs "account_type" est un partenaire
|
||||
'''
|
||||
|
||||
coll_name = MYSY_GV.dbname['partnair_account']
|
||||
|
@ -1837,7 +1842,9 @@ def InitUserPasswd(diction):
|
|||
mycommon.myprint(str(inspect.stack()[0][3]) + " Aucun resultat trouvé pour le compte pro " + str(myquery))
|
||||
return True, "La demande de reinitiation à été prise en compte"
|
||||
|
||||
retVal = coll_name.find(myquery, {"_id": 0, "valide": 0, "user_recid": 0})
|
||||
retVal = coll_name.find(myquery, {"_id": 0, "valide": 0,})
|
||||
|
||||
print(" ### retVal 001 = ", str(retVal[0]))
|
||||
|
||||
"""
|
||||
Dans le cas exclusif du compte pro,
|
||||
|
@ -1853,6 +1860,8 @@ def InitUserPasswd(diction):
|
|||
new_token['active'] = "1"
|
||||
new_token['email'] = str(myemail)
|
||||
|
||||
print(" ### str(retVal[0]['recid']) = ", str(retVal[0]['recid']))
|
||||
|
||||
ret_val = coll_name.find_one_and_update(
|
||||
{'recid': str(retVal[0]['recid']), },
|
||||
{"$set": new_token},
|
||||
|
@ -1860,16 +1869,25 @@ def InitUserPasswd(diction):
|
|||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
|
||||
if (ret_val['_id'] is False):
|
||||
if ("_id" not in ret_val.keys()):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " : Impossible de reinitialiser le mot de passe")
|
||||
return False, "Impossible de reinitialiser le mot de passe"
|
||||
|
||||
"""
|
||||
Apres la mise à jour du partner, on insert l'objet qui signifie qu'il y a une
|
||||
attente de mise à jour de mot de passe
|
||||
"""
|
||||
ret_val_tmp = coll_name.find_one_and_update(
|
||||
{'recid': "tmp_"+str(retVal[0]['recid']), },
|
||||
{"$set": new_token},
|
||||
upsert=True,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
|
||||
ret_val_tmp = coll_name.insert_one(new_token)
|
||||
if (ret_val_tmp is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de créer le nouveau toek")
|
||||
if ("_id" not in ret_val_tmp.keys()):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de créer le nouveau token")
|
||||
return True, "La demande de reinitiation à été prise en compte"
|
||||
|
||||
# Account type 2 is for PRO customers
|
||||
|
|
|
@ -1770,6 +1770,11 @@ def SendEmargementMail( diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
my_emarge_ids = ""
|
||||
if ("tab_ids" in diction.keys()):
|
||||
if diction['tab_ids']:
|
||||
|
|
|
@ -68,6 +68,11 @@ def CreateTableauEmargement(diction):
|
|||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
class_internal_url = ""
|
||||
if ("class_internal_url" in diction.keys()):
|
||||
|
@ -231,6 +236,11 @@ def GetTableauEmargement(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
class_internal_url = ""
|
||||
if ("class_internal_url" in diction.keys()):
|
||||
if diction['class_internal_url']:
|
||||
|
@ -300,6 +310,13 @@ def UpdateUserEmargementDate(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
|
||||
my_email = ""
|
||||
if ("email" in diction.keys()):
|
||||
if diction['email']:
|
||||
|
|
|
@ -171,7 +171,7 @@ def add_partner_account(diction):
|
|||
#tmp = coll_name.find({'email': str(mydata['email']) }).count()
|
||||
tmp = coll_name.count_documents({'email': str(mydata['email']), 'active':'1' })
|
||||
|
||||
logging.info(" TMP = "+str(tmp))
|
||||
#logging.info(" TMP = "+str(tmp))
|
||||
if( tmp > 0 ):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - l'adresse email '"+str(mydata['email'])+"' existe deja, impossible de créer le compte partenaire ")
|
||||
return False, "l'adresse email '"+str(mydata['email'])+"' est deja utilisée, impossible de créer le compte partenaire "
|
||||
|
|
|
@ -2625,6 +2625,12 @@ def GetAttendeeDetail_perSession(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
|
||||
# Recuperation du recid du partenaire
|
||||
partner_recid = get_parnter_recid_from_token(str(my_token))
|
||||
if partner_recid is False:
|
||||
|
|
Loading…
Reference in New Issue