forked from ScoDoc/ScoDoc
Adapte assistance à ScoDoc 9
This commit is contained in:
parent
31505e1330
commit
13c027fc19
@ -65,7 +65,7 @@ from app.scodoc.sco_exceptions import ScoValueError
|
|||||||
SCO_DUMP_LOCK = "/tmp/scodump.lock"
|
SCO_DUMP_LOCK = "/tmp/scodump.lock"
|
||||||
|
|
||||||
|
|
||||||
def sco_dump_and_send_db(REQUEST=None):
|
def sco_dump_and_send_db():
|
||||||
"""Dump base de données et l'envoie anonymisée pour debug"""
|
"""Dump base de données et l'envoie anonymisée pour debug"""
|
||||||
H = [html_sco_header.sco_header(page_title="Assistance technique")]
|
H = [html_sco_header.sco_header(page_title="Assistance technique")]
|
||||||
# get currect (dept) DB name:
|
# get currect (dept) DB name:
|
||||||
@ -94,7 +94,7 @@ def sco_dump_and_send_db(REQUEST=None):
|
|||||||
_anonymize_db(ano_db_name)
|
_anonymize_db(ano_db_name)
|
||||||
|
|
||||||
# Send
|
# Send
|
||||||
r = _send_db(REQUEST, ano_db_name)
|
r = _send_db(ano_db_name)
|
||||||
if (
|
if (
|
||||||
r.status_code
|
r.status_code
|
||||||
== requests.codes.INSUFFICIENT_STORAGE # pylint: disable=no-member
|
== requests.codes.INSUFFICIENT_STORAGE # pylint: disable=no-member
|
||||||
@ -172,7 +172,7 @@ def _get_scodoc_serial():
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def _send_db(REQUEST, ano_db_name):
|
def _send_db(ano_db_name):
|
||||||
"""Dump this (anonymized) database and send it to tech support"""
|
"""Dump this (anonymized) database and send it to tech support"""
|
||||||
log("dumping anonymized database {}".format(ano_db_name))
|
log("dumping anonymized database {}".format(ano_db_name))
|
||||||
try:
|
try:
|
||||||
|
@ -297,6 +297,7 @@ SCO_DEV_MAIL = "emmanuel.viennet@gmail.com" # SVP ne pas changer
|
|||||||
# Adresse pour l'envoi des dumps (pour assistance technnique):
|
# Adresse pour l'envoi des dumps (pour assistance technnique):
|
||||||
# ne pas changer (ou vous perdez le support)
|
# ne pas changer (ou vous perdez le support)
|
||||||
SCO_DUMP_UP_URL = "https://scodoc.iutv.univ-paris13.fr/scodoc-installmgr/upload-dump"
|
SCO_DUMP_UP_URL = "https://scodoc.iutv.univ-paris13.fr/scodoc-installmgr/upload-dump"
|
||||||
|
# SCO_DUMP_UP_URL = "http://192.168.56.1:5000/upload_dump"
|
||||||
|
|
||||||
CSV_FIELDSEP = ";"
|
CSV_FIELDSEP = ";"
|
||||||
CSV_LINESEP = "\n"
|
CSV_LINESEP = "\n"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.0.29"
|
SCOVERSION = "9.0.30"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/opt/zope213/bin/python
|
#!/opt/scodoc/venv/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
|
|
||||||
@ -68,42 +68,51 @@ anonymize_null = "NULL"
|
|||||||
ANONYMIZED_FIELDS = {
|
ANONYMIZED_FIELDS = {
|
||||||
"identite.nom": anonymize_name,
|
"identite.nom": anonymize_name,
|
||||||
"identite.prenom": anonymize_name,
|
"identite.prenom": anonymize_name,
|
||||||
|
"identite.nom_usuel": anonymize_null,
|
||||||
|
"identite.civilite": "'X'",
|
||||||
"identite.date_naissance": anonymize_date,
|
"identite.date_naissance": anonymize_date,
|
||||||
"identite.lieu_naissance": anonymize_question_str,
|
"identite.lieu_naissance": anonymize_question_str,
|
||||||
|
"identite.dept_naissance": anonymize_question_str,
|
||||||
"identite.nationalite": anonymize_question_str,
|
"identite.nationalite": anonymize_question_str,
|
||||||
"identite.foto": anonymize_null,
|
"identite.statut": anonymize_null,
|
||||||
|
"identite.boursier": anonymize_null,
|
||||||
|
"identite.photo_filename": anonymize_null,
|
||||||
"identite.code_nip": anonymize_null,
|
"identite.code_nip": anonymize_null,
|
||||||
"identite.code_ine": anonymize_null,
|
"identite.code_ine": anonymize_null,
|
||||||
"identite.nom_usuel": anonymize_null,
|
"identite.scodoc7_id": anonymize_null,
|
||||||
"adresse.email": "'ano@nyme.fr'",
|
"adresse.email": "'ano@nyme.fr'",
|
||||||
"adresse.emailperso": anonymize_null,
|
"adresse.emailperso": anonymize_null,
|
||||||
"adresse.domicile": anonymize_null,
|
"adresse.domicile": anonymize_null,
|
||||||
|
"adresse.codepostaldomicile": anonymize_null,
|
||||||
|
"adresse.villedomicile": anonymize_null,
|
||||||
|
"adresse.paysdomicile": anonymize_null,
|
||||||
"adresse.telephone": anonymize_null,
|
"adresse.telephone": anonymize_null,
|
||||||
"adresse.telephonemobile": anonymize_null,
|
"adresse.telephonemobile": anonymize_null,
|
||||||
"adresse.fax": anonymize_null,
|
"adresse.fax": anonymize_null,
|
||||||
|
"admissions.nomlycee": anonymize_name,
|
||||||
"billet_absence.description": anonymize_null,
|
"billet_absence.description": anonymize_null,
|
||||||
"etud_annotations.comment": anonymize_name,
|
"etud_annotations.comment": anonymize_name,
|
||||||
"entreprises.nom": anonymize_name,
|
# "entreprises.nom": anonymize_name,
|
||||||
"entreprises.adresse": anonymize_null,
|
# "entreprises.adresse": anonymize_null,
|
||||||
"entreprises.ville": anonymize_null,
|
# "entreprises.ville": anonymize_null,
|
||||||
"entreprises.codepostal": anonymize_null,
|
# "entreprises.codepostal": anonymize_null,
|
||||||
"entreprises.pays": anonymize_null,
|
# "entreprises.pays": anonymize_null,
|
||||||
"entreprises.contact_origine": anonymize_null,
|
# "entreprises.contact_origine": anonymize_null,
|
||||||
"entreprises.secteur": anonymize_null,
|
# "entreprises.secteur": anonymize_null,
|
||||||
"entreprises.note": anonymize_null,
|
# "entreprises.note": anonymize_null,
|
||||||
"entreprises.privee": anonymize_null,
|
# "entreprises.privee": anonymize_null,
|
||||||
"entreprises.localisation": anonymize_null,
|
# "entreprises.localisation": anonymize_null,
|
||||||
"entreprise_correspondant.nom": anonymize_name,
|
# "entreprise_correspondant.nom": anonymize_name,
|
||||||
"entreprise_correspondant.prenom": anonymize_name,
|
# "entreprise_correspondant.prenom": anonymize_name,
|
||||||
"entreprise_correspondant.phone1": anonymize_null,
|
# "entreprise_correspondant.phone1": anonymize_null,
|
||||||
"entreprise_correspondant.phone2": anonymize_null,
|
# "entreprise_correspondant.phone2": anonymize_null,
|
||||||
"entreprise_correspondant.mobile": anonymize_null,
|
# "entreprise_correspondant.mobile": anonymize_null,
|
||||||
"entreprise_correspondant.mail1": anonymize_null,
|
# "entreprise_correspondant.mail1": anonymize_null,
|
||||||
"entreprise_correspondant.mail2": anonymize_null,
|
# "entreprise_correspondant.mail2": anonymize_null,
|
||||||
"entreprise_correspondant.note": anonymize_null,
|
# "entreprise_correspondant.note": anonymize_null,
|
||||||
"entreprise_correspondant.fax": anonymize_null,
|
# "entreprise_correspondant.fax": anonymize_null,
|
||||||
"entreprise_contact.description": anonymize_null,
|
# "entreprise_contact.description": anonymize_null,
|
||||||
"entreprise_contact.enseignant": anonymize_null,
|
# "entreprise_contact.enseignant": anonymize_null,
|
||||||
"notes_appreciations.comment": anonymize_name,
|
"notes_appreciations.comment": anonymize_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ else
|
|||||||
SN=""
|
SN=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CMD="curl --fail --connect-timeout 5 --silent http://scodoc.iutv.univ-paris13.fr/scodoc-installmgr/version?mode=$mode\&release=${SCODOC_RELEASE}\&sn=${SN}"
|
CMD="curl --fail --connect-timeout 5 --silent https://scodoc.iutv.univ-paris13.fr/scodoc-installmgr/version?mode=$mode\&release=${SCODOC_RELEASE}\&sn=${SN}"
|
||||||
|
|
||||||
SVERSION="$(${CMD})"
|
SVERSION="$(${CMD})"
|
||||||
if [ "$?" == 0 ]; then
|
if [ "$?" == 0 ]; then
|
||||||
|
@ -28,6 +28,7 @@ server {
|
|||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto https;
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
|
client_max_body_size 16m;
|
||||||
}
|
}
|
||||||
location /ScoDoc/static {
|
location /ScoDoc/static {
|
||||||
# handle static files directly, without forwarding to the application
|
# handle static files directly, without forwarding to the application
|
||||||
|
@ -83,7 +83,7 @@ su -c "(cd $SCODOC_DIR && source venv/bin/activate && pip install wheel && pip i
|
|||||||
|
|
||||||
# ------------
|
# ------------
|
||||||
SCODOC_RELEASE=$(grep SCOVERSION sco_version.py | awk '{ print substr($3, 2, length($3)-2) }')
|
SCODOC_RELEASE=$(grep SCOVERSION sco_version.py | awk '{ print substr($3, 2, length($3)-2) }')
|
||||||
SVERSION=$(curl --silent http://scodoc.iutv.univ-paris13.fr/scodoc-installmgr/version?mode=install\&release="$SCODOC_RELEASE")
|
SVERSION=$(curl --silent https://scodoc.iutv.univ-paris13.fr/scodoc-installmgr/version?mode=install\&release="$SCODOC_RELEASE")
|
||||||
echo "$SVERSION" > "${SCODOC_VERSION_DIR}/scodoc.sn"
|
echo "$SVERSION" > "${SCODOC_VERSION_DIR}/scodoc.sn"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user