You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2018/10/04 16:46:29 UTC
[2/3] allura git commit: [#8225] Skip 404 for non root and only when
deleted
[#8225] Skip 404 for non root and only when deleted
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/f3f93906
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f3f93906
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f3f93906
Branch: refs/heads/master
Commit: f3f93906445ca60da8895874e6524f6f4ff2e40f
Parents: abf425b
Author: Shalitha <sh...@gmail.com>
Authored: Wed Oct 3 14:30:19 2018 +0530
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Oct 4 15:46:17 2018 +0000
----------------------------------------------------------------------
Allura/allura/ext/admin/admin_main.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/f3f93906/Allura/allura/ext/admin/admin_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index c3651e0..7fa382d 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -703,7 +703,8 @@ class ProjectAdminController(BaseController):
except forge_exc.ForgeError, exc:
flash('%s: %s' % (exc.__class__.__name__, exc.args[0]),
'error')
- if re.search(tool[0]['mount_point']+ r'\/$', request.referer):
+ if tool is not None and 'delete' in tool[0] and re.search(c.project.url() + tool[0]['mount_point']+ r'\/*', request.referer):
+ # Redirect to root when deleting currect module
redirect('../')
redirect(request.referer)