incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [3/4] git commit: [#6830] Remove project root redirect to activity app
Date Thu, 12 Dec 2013 18:55:53 GMT
[#6830] Remove project root redirect to activity app

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@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/6a47d3d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6a47d3d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6a47d3d9

Branch: refs/heads/master
Commit: 6a47d3d9602cf37c9bcc39a13225841529e9667a
Parents: 26209f4
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Mon Dec 9 22:22:55 2013 +0000
Committer: Cory Johns <admin1@users.sf.net>
Committed: Thu Dec 12 17:55:08 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/6a47d3d9/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/6a47d3d9/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')


Mime
View raw message