cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/site/luci/Extensions LuciDB.py
Date: 5 Feb 2008 22:08:09 -0000	[thread overview]
Message-ID: <20080205220809.10789.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	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	other threads:[~2008-02-05 22:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 22:08 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-02-06 21:15 [Cluster-devel] conga/luci/site/luci/Extensions LuciDB.py rmccabe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080205220809.10789.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).