CVSROOT:        /cvs/cluster
Module name:    conga
Changes by:     [EMAIL PROTECTED]       2008-02-05 22:08:08

Modified files:
        luci/site/luci/Extensions: LuciDB.py 

Log message:
        Fix 429801

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciDB.py.diff?cvsroot=cluster&r1=1.9&r2=1.10

--- conga/luci/site/luci/Extensions/LuciDB.py   2008/01/25 00:36:59     1.9
+++ conga/luci/site/luci/Extensions/LuciDB.py   2008/02/05 22:08:08     1.10
@@ -773,7 +773,7 @@
 
        try:
                user = getSecurityManager().getUser()
-               if user.has_permission('View', cluster[1]):
+               if user.has_permission('View', cluster):
                        return True
        except Exception, e:
                if LUCI_DEBUG_MODE is True:
@@ -789,28 +789,29 @@
        return allowed.has_key(hostname)
 
 def getRicciAgent(self, clustername, exclude_names=None, exclude_busy=False):
-       try:
-               perm = cluster_permission_check(self, clustername)
-               if not perm:
-                       if LUCI_DEBUG_MODE is True:
-                               luci_log.debug_verbose('GRA0: no permission for 
%s' \
-                                       % clustername)
-                       return None
-       except Exception, e:
-               if LUCI_DEBUG_MODE is True:
-                       luci_log.debug_verbose('GRA0: %r %s' % (e, str(e)))
-               return None
-
        clusterfolder = None
        try:
                path = str('%s%s' % (CLUSTER_FOLDER_PATH, clustername))
                clusterfolder = self.restrictedTraverse(path)
                if not clusterfolder:
                        if LUCI_DEBUG_MODE is True:
-                               luci_log.debug('GRA1: cluster folder %s for %s 
is missing' \
+                               luci_log.debug('GRA0: cluster folder %s for %s 
is missing' \
                                        % (path, clustername))
                        return None
 
+               try:
+                       perm = cluster_permission_check(self, clusterfolder)
+                       if not perm:
+                               if LUCI_DEBUG_MODE is True:
+                                       luci_log.debug_verbose('GRA1: no 
permission for %s' \
+                                               % clustername)
+                               return None
+               except Exception, e1:
+                       if LUCI_DEBUG_MODE is True:
+                               luci_log.debug_verbose('GRA2: %s: %r %s' \
+                                       % (clustername, e1, str(e1)))
+                       return None
+
                nodes = clusterfolder.objectItems('Folder')
                if len(nodes) < 1:
                        if LUCI_DEBUG_MODE is True:

Reply via email to