Commit 2a66e16d authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Keep bakward compatibility on the role identifier.

Mail server is running but desactivate it for the time being.
Remove the code forcing the migrate flag to true for new database.
Activate MySQL database.
parent 5aa227f2
......@@ -67,6 +67,7 @@
'check and validate': 'vérifier et valider',
'Check latex syntax': 'Vérifier la syntaxe latex',
'Check to delete': 'Check to delete',
'Click on the link %(link)s to verify your email': 'Click on the link %(link)s to verify your email',
'Click on the link http://localhost:8000/track_publications/default/user/reset_password/%(key)s to reset your password': 'Click on the link http://localhost:8000/track_publications/default/user/reset_password/%(key)s to reset your password',
'Client IP': 'Client IP',
'Code': 'Code',
......@@ -120,6 +121,7 @@
'E-mail': 'E-mail',
'Edit current record': 'Edit current record',
'Email sent': 'Email sent',
'Email verification': 'Email verification',
'enter a number between %(min)g and %(max)g': 'enter a number between %(min)g and %(max)g',
'enter an integer between %(min)g and %(max)g': 'entrez un entier entre %(min)g et %(max)g',
'enter an integer greater than or equal to %(min)g': 'entrez un entier plus grand ou égual à %(min)g',
......@@ -236,6 +238,7 @@
'Pages': 'Pages',
'Parameter for fuzzy string search.': 'Paramètre pour la comparaison des chaînes de caractères.',
'Password': 'Password',
'Password changed': 'Password changed',
"Password fields don't match": "Password fields don't match",
'Password reset': 'Password reset',
'PhDs': 'PhDs',
......@@ -390,6 +393,7 @@
'User ID': 'User ID',
'Usual': 'Usual',
'Validate': 'Valider',
'value already in database or empty': 'value already in database or empty',
'value not allowed': 'value not allowed',
'Verify Password': 'Verify Password',
'versions': 'versions',
......
......@@ -3,26 +3,19 @@ from gluon.tools import Auth
DB_MYSQL = 'mysql://GesProd:Prod_CPPM@maretude.in2p3.fr/GesProd'
MIGRATE = False
ID_ADMIN, ADMIN, DEF_ADMIN = 100, 'admin', 'administrators, librairians,...'
ID_USER, USER, DEF_USER = 200, 'user', 'liaisons, team leaders,...'
ID_ADMIN, ADMIN, DEF_ADMIN = 1, 'admin', 'administrators, librairians,...'
ID_USER, USER, DEF_USER = 2, 'user', 'liaisons, team leaders,...'
#
# Main database
# connect to the database
#
#try:
# db = DAL(DB_MYSQL, migrate=False, pool_size=10)
#except:
# raise HTTP(500, T("Can't access the MySQL database !!!"))
try:
db = DAL(DB_MYSQL, migrate=MIGRATE, pool_size=10)
except:
raise HTTP(500, T("Can't access the MySQL database !!!"))
db = DAL('sqlite://storage.sqlite', migrate=MIGRATE)
#db = DAL('sqlite://storage.sqlite', migrate=MIGRATE)
#
# Force the migrate flag to true when the database is empty
# in order to allow the creation of the tables
#
if not db.tables():
MIGRATE = True
#
# User logging
# Approval is required for newly registered users
......@@ -54,9 +47,10 @@ if not db(db.auth_user.id).count():
# activate the mailer
#mail = auth.settings.mailer
#mail.settings.server = 'marsmtp.in2p3.fr:25'
#mail.settings.server = 'marsmtp.in2p3.fr'
#mail.settings.sender = 'legac@cppm.in2p3.fr'
#mail.settings.login = None
#mail.settings.tls = False
# tune authentification fields for the extJS interface
db.auth_user.registration_key.readable = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment