Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   conga/luci/site/luci/Extensions LuciDB.py (http://www.linux-archive.org/cluster-development/48203-conga-luci-site-luci-extensions-lucidb-py.html)

02-05-2008 09:08 PM

conga/luci/site/luci/Extensions LuciDB.py
 
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe@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:

02-06-2008 08:15 PM

conga/luci/site/luci/Extensions LuciDB.py
 
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe@sourceware.org 2008-02-06 21:15:07

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

Log message:
Fix capitalization of the permission class

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

--- conga/luci/site/luci/Extensions/LuciDB.py 2008/02/05 22:08:08 1.10
+++ conga/luci/site/luci/Extensions/LuciDB.py 2008/02/06 21:15:06 1.11
@@ -384,7 +384,7 @@

try:
newCluster.manage_acquiredPermissions([])
- newCluster.manage_role('View', ['Access Contents Information', 'View'])
+ newCluster.manage_role('View', ['Access contents information', 'View'])
except Exception, e:
if LUCI_DEBUG_MODE is True:
luci_log.debug_verbose('MC3: %s: %r %s' % (clustername, e, str(e)))


All times are GMT. The time now is 03:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.