You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/12/10 03:07:33 UTC

[3/4] git commit: [#6830] Remove project root redirect to activity app

[#6830] Remove project root redirect to activity app

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/942f4c09
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/942f4c09
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/942f4c09

Branch: refs/heads/tv/6830
Commit: 942f4c09b177df6dddb9f974e17f23bc5dcee020
Parents: 9073264
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Mon Dec 9 22:22:55 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Mon Dec 9 22:46:41 2013 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/project.py        |  4 +---
 Allura/allura/tests/functional/test_root.py | 17 -----------------
 2 files changed, 1 insertion(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/942f4c09/Allura/allura/controllers/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index ebaeaa3..b0e5b8b 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -370,9 +370,7 @@ class ProjectController(FeedController):
         activity_enabled = config.get('activitystream.enabled', False)
         activity_enabled = request.cookies.get('activitystream.enabled', activity_enabled)
         activity_enabled = asbool(activity_enabled)
-        if activity_enabled and c.project.app_instance('activity'):
-            redirect('activity/')
-        elif mount is not None:
+        if mount is not None:
             if 'ac' in mount:
                 redirect(mount['ac'].options.mount_point + '/')
             elif 'sub' in mount:

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/942f4c09/Allura/allura/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_root.py b/Allura/allura/tests/functional/test_root.py
index aa77873..918377f 100644
--- a/Allura/allura/tests/functional/test_root.py
+++ b/Allura/allura/tests/functional/test_root.py
@@ -94,23 +94,6 @@ class TestRootController(TestController):
         assert len(response.html.findAll('a',{'href':'/adobe/adobe-1/'})) == 0
         assert len(response.html.findAll('a',{'href':'/adobe/adobe-2/'})) == 0
 
-    def test_project_redirect(self):
-        with push_config(config, **{'activitystream.enabled': 'false'}):
-            resp = self.app.get('/p/test2/')
-            assert_equal(resp.status_int, 302)
-            assert_equal(resp.location, 'http://localhost/p/test2/admin/')
-
-        with push_config(config, **{'activitystream.enabled': 'true'}):
-            resp = self.app.get('/p/test2/')
-            assert_equal(resp.status_int, 302)
-            assert_equal(resp.location, 'http://localhost/p/test2/activity/')
-
-        with push_config(config, **{'activitystream.enabled': 'false'}):
-            self.app.cookies['activitystream.enabled'] = 'true'
-            resp = self.app.get('/p/test2/')
-            assert_equal(resp.status_int, 302)
-            assert_equal(resp.location, 'http://localhost/p/test2/activity/')
-
     def test_neighborhood_home(self):
         # Install home app
         nb = M.Neighborhood.query.get(name='Adobe')