From 1437f9d23891443e99379f7c878475ff1f9fc782 Mon Sep 17 00:00:00 2001 From: Ernest W Durbin III Date: Sun, 25 Mar 2018 18:18:49 -0400 Subject: [PATCH] destroy documentation using warehouse now --- templates/pkg_edit.pt | 16 +++++++-------- webui.py | 45 ------------------------------------------- 2 files changed, 7 insertions(+), 54 deletions(-) diff --git a/templates/pkg_edit.pt b/templates/pkg_edit.pt index 07f4c292..7ec85a6b 100755 --- a/templates/pkg_edit.pt +++ b/templates/pkg_edit.pt @@ -85,16 +85,14 @@ uncheck the button below

If you would like to DESTROY any existing documentation hosted at -Use this button, There is no undo. +tal:content="string:http://pythonhosted.org/${data/name}">: Please use + +the Warehouse test instance + + +Warehouse +

-
- - - -
-

diff --git a/webui.py b/webui.py index b0548f6f..c3f25082 100644 --- a/webui.py +++ b/webui.py @@ -2456,51 +2456,6 @@ def doc_upload(self): ) ) - # - # Documentation Destruction - # - @must_tls - def doc_destroy(self): - # make sure the user is identified - if not self.authenticated: - raise Unauthorised, \ - "You must be identified to edit package information" - - # only allow via WebUI - self.csrf_check() - - # figure the package name and version - name = version = None - if self.form.has_key('name'): - name = self.form['name'] - if not name: - raise FormError, 'No package name given' - - # make sure the user has permission to do stuff - if not (self.store.has_role('Owner', name) or - self.store.has_role('Admin', name) or - self.store.has_role('Maintainer', name)): - raise Forbidden, \ - "You are not allowed to edit '%s' package information"%name - - try: - self.store.lock_docs(name) - except store.LockedException: - raise FormError, "Error: Another doc modification is in progress." - - # Assume the file is valid; remove any previous data - if self.docs_fs.exists(name): - for dirname, files in self.docs_fs.walk(name, search="depth"): - for filename in files: - self.docs_fs.remove(os.path.join(dirname, filename)) - self.docs_fs.removedir(dirname) - - self.store.set_has_docs(name, value=False) - self.store.log_docs(name, version, 'docdestroy') - self.store.changed() - self.write_template('message.pt', title='Documentation Destroyed', - message='Documentation Destroyed for %s.' % (name,),) - # # Reverse download for Google AppEngine #