Commit fc246ae5 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Install the authentification mechanism.

parent 49dc7cb3
......@@ -2,6 +2,7 @@
"""
@auth.requires_membership('track_publications')
def index():
session.role = 'admin'
return LOAD('plugin_dbui', 'index', vars=request.vars)
#-------------------------------------------------------------------------------
#
# connection to the mysql database
#
#-------------------------------------------------------------------------------
db = DAL('mysql://GesProd:Prod_CPPM@maretude.in2p3.fr/GesProd',
migrate=True,
pool_size=10)
#-------------------------------------------------------------------------------
#
# connection to the sqlite database
#
#-------------------------------------------------------------------------------
db = DAL('sqlite://storage.sqlite', migrate=True)
from gluon.tools import Auth
DB_MYSQL = 'mysql://GesProd:Prod_CPPM@maretude.in2p3.fr/GesProd'
DB_USERS = 'sqlite:///lhcb/users/legac/mywap/web2py/track_users/databases/storage.sqlite'
#
# Main database
#
try:
db = DAL(DB_MYSQL, migrate=True, pool_size=10)
except:
raise HTTP(500, T("Can't access the MySQL database !!!"))
#db = DAL('sqlite://storage.sqlite', migrate=True)
#
# Authentification
#
#try:
# dbu = DAL(DB_USERS, migrate=False)
#
#except:
# raise HTTP(500, T("Can't access the users database !!!"))
#
#
#auth = Auth(dbu, hmac_key=Auth.get_or_create_key())
#
#auth.define_tables()
#auth.settings.registration_requires_verification = False
#auth.settings.registration_requires_approval = True
#auth.settings.remember_me_form = False
#auth.settings.reset_password_requires_verification = True
\ No newline at end of file
......@@ -3,8 +3,8 @@
HEAD
- Rename the table degrees as levels in order to run with MySQL.
- Connection to the database in dedicated files.
- Sort in alphabetic order the content of all technical tables.
- Connection to the database and authenfication move in the access.py files.
- Sort the content of all tables (alphabetic, order of arrival, ...).
- Activate the Double click to start the RowEditor in update mode.
- Dedicated page to show version numbers.
......
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