goa/gaesource.py
branchtls-sprint
changeset 1132 96752791c2b6
parent 0 b97547f5f1fa
child 1398 5fe84a5f7035
equal deleted inserted replaced
1131:544609e83317 1132:96752791c2b6
     1 """Adapter for google appengine source.
     1 """Adapter for google appengine source.
     2 
     2 
     3 :organization: Logilab
     3 :organization: Logilab
     4 :copyright: 2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     4 :copyright: 2008-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     6 """
     6 """
     7 __docformat__ = "restructuredtext en"
     7 __docformat__ = "restructuredtext en"
     8 
     8 
     9 from logilab.common.decorators import cached, clear_cache
     9 from cubicweb import AuthenticationError, UnknownEid
    10 
       
    11 from cubicweb import AuthenticationError, UnknownEid, server
       
    12 from cubicweb.server.sources import AbstractSource, ConnectionWrapper
    10 from cubicweb.server.sources import AbstractSource, ConnectionWrapper
    13 from cubicweb.server.pool import SingleOperation
    11 from cubicweb.server.pool import SingleOperation
    14 from cubicweb.server.utils import crypt_password
    12 from cubicweb.server.utils import crypt_password
    15 from cubicweb.goa.dbinit import set_user_groups
    13 from cubicweb.goa.dbinit import set_user_groups
    16 from cubicweb.goa.rqlinterpreter import RQLInterpreter
    14 from cubicweb.goa.rqlinterpreter import RQLInterpreter
    17 
    15 
    18 from google.appengine.api.datastore import Key, Entity, Get, Put, Delete
    16 from google.appengine.api.datastore import Key, Entity, Put, Delete
    19 from google.appengine.api.datastore import Query
       
    20 from google.appengine.api import datastore_errors, users
    17 from google.appengine.api import datastore_errors, users
    21     
    18     
    22 def _init_groups(guser, euser):
    19 def _init_groups(guser, euser):
    23     # set default groups
    20     # set default groups
    24     if guser is None:
    21     if guser is None: