Skip to contentSkip to conversation

conga/luci/utils luci_admin

Cluster-devel [email protected] 1 participant 1 message Jun 29, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-06-29 17:51:12

Modified files:
luci/utils : luci_admin

Log message:
fix permissions bug after a restore for non-admin users

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/utils/luci_admin.diff?cvsroot=cluster&r1=1.23&r2=1.24

luci/utils/luci_admin +6 -0
@@ -306,6 +306,8 @@
 			new_system = app.unrestrictedTraverse('/luci/systems/storage/' + id)
 			if not new_system:
 				raise
+			new_system.manage_acquiredPermissions([])
+			new_system.manage_role('View', ['Access contents information','View'])
 		except:
 			sys.stderr.write('An error occurred while restoring storage system \"' + id + '\"\n')
 			transaction.abort()
@@ -365,6 +367,8 @@
 			new_cluster = app.unrestrictedTraverse('/luci/systems/cluster/'+ id)
 			if not new_cluster:
 				raise
+			new_cluster.manage_acquiredPermissions([])
+			new_cluster.manage_role('View', ['Access contents information','View'])
 		except:
 			sys.stderr.write('An error occurred while restoring the cluster \"' + id + '\"\n')
 			transaction.abort()
@@ -410,6 +414,8 @@
 					newcs = app.unrestrictedTraverse('/luci/systems/cluster/' + id + '/' + newsys)
 					if not newcs:
 						raise
+					newcs.manage_acquiredPermissions([])
+					newcs.manage_role('View', ['Access contents information','View'])
 				except:
 					sys.stderr.write('An error occurred while restoring the storage system \"' + newsys + '\" for cluster \"' + id + '\"\n')
 					transaction.abort()