summaryrefslogtreecommitdiffstats
path: root/cobbler/webui/CobblerWeb.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-04-02 17:53:42 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-04-02 17:53:42 -0400
commit3e29f5d729da704f608b2cd2dc7cf16a42d934f4 (patch)
tree5b485d94d00bb13c411b38e608353688ca9a57dd /cobbler/webui/CobblerWeb.py
parentcb93964cf63ad7e56fd5d581df3b59c0e7e8d1ac (diff)
downloadthird_party-cobbler-3e29f5d729da704f608b2cd2dc7cf16a42d934f4.tar.gz
third_party-cobbler-3e29f5d729da704f608b2cd2dc7cf16a42d934f4.tar.xz
third_party-cobbler-3e29f5d729da704f608b2cd2dc7cf16a42d934f4.zip
Deletion from the WebUI now has a checkbox for distros/profiles to decide
whether you want them to delete recursively or not. The default is not, and if you own a parent object you /are/ allowed to delete the children following the ownership model at this point in time.
Diffstat (limited to 'cobbler/webui/CobblerWeb.py')
-rw-r--r--cobbler/webui/CobblerWeb.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/cobbler/webui/CobblerWeb.py b/cobbler/webui/CobblerWeb.py
index cdeef24..8813006 100644
--- a/cobbler/webui/CobblerWeb.py
+++ b/cobbler/webui/CobblerWeb.py
@@ -187,8 +187,12 @@ class CobblerWeb(object):
# handle deletes as a special case
if new_or_edit == 'edit' and delete1 and delete2:
- try:
- self.remote.remove_distro(name,self.token,recursive)
+ try:
+ if recursive is None:
+ self.remote.remove_distro(name,self.token,False)
+ else:
+ self.remote.remove_distro(name,self.token,True)
+
except Exception, e:
return self.error_page("could not delete %s, %s" % (name,str(e)))
return self.distro_list()
@@ -480,7 +484,11 @@ class CobblerWeb(object):
# handle deletes as a special case
if new_or_edit == 'edit' and delete1 and delete2:
try:
- self.remote.remove_profile(name,self.token,recursive)
+ if recursive:
+ self.remote.remove_profile(name,self.token,True)
+ else:
+ self.remote.remove_profile(name,self.token,False)
+
except Exception, e:
return self.error_page("could not delete %s, %s" % (name,str(e)))
return self.profile_list()