def __init__(self, userClass=None, store=None, useSQL=None): """ @@ 2001-02-18 ce: docs """ # If no userClass was specified, try to pull 'User' # out of the object model. if userClass is None: userClass = store.model().klass('User', None) UserManager.__init__(self, userClass) if store is None: from MiddleKit.ObjectStore.Store import Store store = Store assert store, 'MiddleKit store is None.' self._store = store # If the user didn't say whether or not to useSQL, then # we'll check if this looks like a SQLObjectStore. If so, # then using SQL server side queries will speed up our # operation: if useSQL is None: useSQL = getattr(self._store, 'executeSQL') is not None self._useSQL = useSQL # _saveNewUsers: if true, then we do a store.saveChanges() # whenever a new user is added. This helps with the # integrity of accessors like users(). # @@ 2001-02-18 ce: But perhaps that's a problem because # manager is not a MiddleKit object... self._saveNewUsers = 1
def __init__(self, userClass=None, store=None, useSQL=None): """ @@ 2001-02-18 ce: docs """ # If no userClass was specified, try to pull 'User' # out of the object model. if userClass is None: userClass = store.model().klasses('User', None) UserManager.__init__(self, userClass) if store is None: from MiddleKit.ObjectStore.Store import Store store = Store assert store, 'MiddleKit store is None.' self._store = store # If the user didn't say whether or not to useSQL, then # we'll check if this looks like a SQLObjectStore. If so, # then using SQL server side queries will speed up our # operation: if useSQL is None: useSQL = getattr(self._store, 'executeSQL') is not None self._useSQL = useSQL # _saveNewUsers: if true, then we do a store.saveChanges() # whenever a new user is added. This helps with the # integrity of accessors like users(). # @@ 2001-02-18 ce: But perhaps that's a problem because # manager is not a MiddleKit object... self._saveNewUsers = 1
def __init__(self, userClass=None): UserManager.__init__(self, userClass) RoleUserManagerMixIn.__init__(self)
def __init__(self, userClass=None): UserManager.__init__(self, userClass=None) self.setEncoderDecoder(dump, load) self.setUserDir(os.getcwd()) self.initNextSerialNum()