server/__init__.py
changeset 10095 200bd6a601dc
parent 10074 ab956b780d4e
child 10096 decd60fa8cc5
equal deleted inserted replaced
10094:954765f57fb6 10095:200bd6a601dc
   194     # monkey patch this method if you want to customize admin/anon creation
   194     # monkey patch this method if you want to customize admin/anon creation
   195     # (that maybe necessary if you change CWUser's schema)
   195     # (that maybe necessary if you change CWUser's schema)
   196     user = session.create_entity('CWUser', login=login, upassword=pwd)
   196     user = session.create_entity('CWUser', login=login, upassword=pwd)
   197     for group in groups:
   197     for group in groups:
   198         session.execute('SET U in_group G WHERE U eid %(u)s, G name %(group)s',
   198         session.execute('SET U in_group G WHERE U eid %(u)s, G name %(group)s',
   199                         {'u': user.eid, 'group': group})
   199                         {'u': user.eid, 'group': unicode(group)})
   200     return user
   200     return user
   201 
   201 
   202 def init_repository(config, interactive=True, drop=False, vreg=None,
   202 def init_repository(config, interactive=True, drop=False, vreg=None,
   203                     init_config=None):
   203                     init_config=None):
   204     """initialise a repository database by creating tables add filling them
   204     """initialise a repository database by creating tables add filling them