[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ...



CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe sourceware org	2006-10-19 14:57:17

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

Log message:
	fix for bz# 211104

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&r2=1.120.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/storage_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7&r2=1.7.2.1

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/16 21:01:25	1.120
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/19 14:57:17	1.120.2.1
@@ -21,7 +21,7 @@
 from clusterOS import resolveOSType
 from GeneralError import GeneralError
 from UnknownClusterError import UnknownClusterError
-from homebase_adapters import nodeUnauth, nodeAuth, manageCluster, createClusterSystems, havePermCreateCluster, setNodeFlag, delNodeFlag
+from homebase_adapters import nodeUnauth, nodeAuth, manageCluster, createClusterSystems, havePermCreateCluster, setNodeFlag, delNodeFlag, userAuthenticated
 
 #Policy for showing the cluster chooser menu:
 #1) If there are no clusters in the ManagedClusterSystems
@@ -1225,6 +1225,8 @@
 def getTabs(self, req):
   ###XXX Make this method return only tabs current user can use
   portaltabs = list()
+  if userAuthenticated(self):
+    return portaltabs
   selectedtab = "homebase"
   try:
     baseurl = req['URL']
--- conga/luci/site/luci/Extensions/storage_adapters.py	2006/10/16 04:51:32	1.7
+++ conga/luci/site/luci/Extensions/storage_adapters.py	2006/10/19 14:57:17	1.7.2.1
@@ -370,50 +370,3 @@
   url += '&' + STONAME + '=' + hostname
   return url
 
-
-def getTabs(self, req):
-  ###XXX Make this method return only tabs current user can use
-  portaltabs = list()
-  selectedtab = "homebase"
-  try:
-    baseurl = req['URL']
-    if baseurl.find("cluster") > (-1):
-      selectedtab = "cluster"
-    elif baseurl.find("storage") > (-1):
-      selectedtab = "storage"
-    else:
-      selectedtab = "homebase"
-  except KeyError, e:
-    pass
-
-  htab = { 'Title':"homebase",
-           'Description':"Home base for this luci server", 
-           'Taburl':"../homebase"}
-  if selectedtab == "homebase":
-    htab['isSelected'] = True
-  else:
-    htab['isSelected'] = False
-      
-
-  ctab = { 'Title':"cluster",
-           'Description':"Cluster configuration page", 
-           'Taburl':"../cluster?pagetype=3"}
-  if selectedtab == "cluster":
-    ctab['isSelected'] = True
-  else:
-    ctab['isSelected'] = False
-
-  stab = { 'Title':"storage",
-           'Description':"Storage configuration page", 
-           'Taburl':"../storage"}
-  if selectedtab == "storage":
-    stab['isSelected'] = True
-  else:
-    stab['isSelected'] = False
-
-  portaltabs.append(htab) 
-  portaltabs.append(ctab) 
-  portaltabs.append(stab) 
-
-  return portaltabs
-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]