comparison sat_pubsub/memory_storage.py @ 263:9dfd3890e646

added the constant FLAG_RETRACT_ALLOW_PUBLISHER to allow a publisher to retract an item he has published in a node of "open" publish model.
author souliane <souliane@mailoo.org>
date Fri, 21 Feb 2014 16:10:11 +0100
parents d55620ceafed
children 89493845d3dd
comparison
equal deleted inserted replaced
262:7b821432d012 263:9dfd3890e646
316 self._itemlist = [] 316 self._itemlist = []
317 317
318 return defer.succeed(None) 318 return defer.succeed(None)
319 319
320 320
321 def filterItemsWithPublisher(self, itemIdentifiers, requestor):
322 filteredItems = []
323 for itemIdentifier in itemIdentifiers:
324 try:
325 if self._items[itemIdentifier].publisher.userhost() == requestor.userhost():
326 filteredItems.append(self.items[itemIdentifier])
327 except KeyError, AttributeError:
328 pass
329 return defer.succeed(filteredItems)
330
331
321 class CollectionNode(Node): 332 class CollectionNode(Node):
322 nodeType = 'collection' 333 nodeType = 'collection'
323 334
324 335
325 336