diff idavoll/pubsub.py @ 97:cf918d581da5

Enable admin to hide all nodes when the service is queried using disco items.
author Ralph Meijer <ralphm@ik.nu>
date Tue, 23 Nov 2004 17:05:21 +0000
parents f289c3e1dd0a
children b9c449f4c167
line wrap: on
line diff
--- a/idavoll/pubsub.py	Tue Nov 23 16:36:58 2004 +0000
+++ b/idavoll/pubsub.py	Tue Nov 23 17:05:21 2004 +0000
@@ -117,6 +117,10 @@
 
 class ComponentServiceFromService(Service):
 
+    def __init__(self, backend):
+        Service.__init__(self, backend)
+        self.hide_nodes = False
+
     def get_disco_info(self, node):
         info = []
 
@@ -141,7 +145,7 @@
             return d
 
     def get_disco_items(self, node):
-        if node:
+        if node or self.hide_nodes:
             return defer.succeed([])
         
         d = self.backend.get_nodes()