Skip to contentSkip to conversation

conga/luci/site/luci/Extensions cluster_adapte ...

Cluster-devel [email protected] 1 participant 1 message Oct 30, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: jparsons at sourceware.org 2006-10-30 20:43:25

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

Log message:
fix unbound local error

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.120.2.6&r2=1.120.2.7

luci/site/luci/Extensions/cluster_adapters.py +4 -3
@@ -760,8 +760,8 @@
   else:
     cldata['currentItem'] = False
 
-
-  if havePermCreateCluster(self):
+  UserHasPerms = havePermCreateCluster(self)
+  if UserHasPerms:
     cladd = {}
     cladd['Title'] = "Create a New Cluster"
     cladd['cfg_type'] = "clusteradd"
@@ -812,7 +812,8 @@
 
   mylist = list()
   mylist.append(cldata)
-  mylist.append(cladd)
+  if UserHasPerms:
+    mylist.append(cladd)
   mylist.append(clcfg)
   dummynode['children'] = mylist