comparison sat_pubsub/pgsql_storage.py @ 309:890b24b37b56

Re-implemented feature which allows an entity to retract an item from somebody else node (i.e. a node from which he is neither owner or publisher) if he is the publisher of the item.
author Goffi <goffi@goffi.org>
date Mon, 21 Dec 2015 13:41:15 +0100
parents 087b705493a6
children a776544d84e5
comparison
equal deleted inserted replaced
308:087b705493a6 309:890b24b37b56
943 943
944 cursor.execute("""DELETE FROM items WHERE 944 cursor.execute("""DELETE FROM items WHERE
945 node_id=%s""", 945 node_id=%s""",
946 (self.nodeDbId,)) 946 (self.nodeDbId,))
947 947
948 # FIXME: to be checked
949 # def filterItemsWithPublisher(self, itemIdentifiers, recipient):
950 # return self.dbpool.runInteraction(self._filterItemsWithPublisher, itemIdentifiers, recipient)
951
952 # def _filterItemsWithPublisher(self, cursor, itemIdentifiers, requestor):
953 # self._checkNodeExists(cursor)
954 # ret = []
955 # for itemIdentifier in itemIdentifiers:
956 # args = ["%s/%%" % requestor.userhost(), itemIdentifier]
957 # cursor.execute("""SELECT item FROM items WHERE publisher LIKE %s AND item=%s""", args)
958 # result = cursor.fetchone()
959 # if result:
960 # ret.append(result[0])
961 # return ret
962 948
963 class CollectionNode(Node): 949 class CollectionNode(Node):
964 950
965 nodeType = 'collection' 951 nodeType = 'collection'
966 952