You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/01/22 00:07:10 UTC
[1/2] git commit: [#7002] Fixed test failing when run after other
tests
Updated Branches:
refs/heads/cj/7002 2590b2ed1 -> b01a3df06
[#7002] Fixed test failing when run after other tests
Signed-off-by: Cory Johns <cj...@slashdotmedia.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/9eb7d97d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9eb7d97d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9eb7d97d
Branch: refs/heads/cj/7002
Commit: 9eb7d97d13ff5178d5a55d35b8ca502e293a5f66
Parents: 2590b2e
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Jan 21 22:57:45 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Tue Jan 21 22:57:45 2014 +0000
----------------------------------------------------------------------
Allura/allura/tests/functional/test_user_profile.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9eb7d97d/Allura/allura/tests/functional/test_user_profile.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_user_profile.py b/Allura/allura/tests/functional/test_user_profile.py
index 1f58868..a243bf5 100644
--- a/Allura/allura/tests/functional/test_user_profile.py
+++ b/Allura/allura/tests/functional/test_user_profile.py
@@ -163,16 +163,16 @@ class TestUserProfile(TestController):
return m
eps = map(ep, ['a', 'b', 'c', 'd'])
order = {'user_profile_sections.order': 'b, d,c , f '}
+ delattr(type(app), '_sections')
with mock.patch('allura.lib.helpers.iter_entry_points') as iep:
with mock.patch.dict(tg.config, order):
iep.return_value = eps
sections = app.profile_sections
assert_equal(sections, [
- eps[1].load(),
- eps[3].load(),
- eps[2].load(),
- eps[0].load(),
- ])
+ eps[1].load(),
+ eps[3].load(),
+ eps[2].load(),
+ eps[0].load()])
r = self.app.get('/u/test-user/profile')
assert_in('Section a', r.body)
assert_in('Section b', r.body)
[2/2] git commit: [#7002] Added activitystream.enabled check to
profile section check_display
Posted by jo...@apache.org.
[#7002] Added activitystream.enabled check to profile section check_display
Signed-off-by: Cory Johns <cj...@slashdotmedia.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/b01a3df0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b01a3df0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b01a3df0
Branch: refs/heads/cj/7002
Commit: b01a3df066bb4e7cc4a02e3bed30b24606a2479d
Parents: 9eb7d97
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Jan 21 23:05:35 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Tue Jan 21 23:05:35 2014 +0000
----------------------------------------------------------------------
Allura/allura/ext/user_profile/user_main.py | 10 +++++-----
ForgeActivity/forgeactivity/main.py | 11 ++++++++---
2 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b01a3df0/Allura/allura/ext/user_profile/user_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/user_main.py b/Allura/allura/ext/user_profile/user_main.py
index 788d8a2..31e4bf0 100644
--- a/Allura/allura/ext/user_profile/user_main.py
+++ b/Allura/allura/ext/user_profile/user_main.py
@@ -146,12 +146,12 @@ class UserProfileController(BaseController, FeedController):
if not user:
raise exc.HTTPNotFound()
provider = AuthenticationProvider.get(request)
- sections = [section(user, c.project) for section in c.app.profile_sections]
+ sections = [section(user, c.project)
+ for section in c.app.profile_sections]
return dict(
- user=user,
- reg_date=provider.user_registration_date(user),
- sections=sections,
- )
+ user=user,
+ reg_date=provider.user_registration_date(user),
+ sections=sections)
def get_feed(self, project, app, user):
"""Return a :class:`allura.controllers.feed.FeedArgs` object describing
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b01a3df0/ForgeActivity/forgeactivity/main.py
----------------------------------------------------------------------
diff --git a/ForgeActivity/forgeactivity/main.py b/ForgeActivity/forgeactivity/main.py
index 6d50427..a86d00f 100644
--- a/ForgeActivity/forgeactivity/main.py
+++ b/ForgeActivity/forgeactivity/main.py
@@ -33,7 +33,6 @@ from allura.lib.security import require_authenticated
from allura.model.timeline import perm_check
from allura.lib import helpers as h
from allura.lib.decorators import require_post
-from allura.model.timeline import perm_check
from allura.ext.user_profile import ProfileSectionBase
from .widgets.follow import FollowToggle
@@ -101,7 +100,8 @@ class ForgeActivityController(BaseController):
following = g.director.is_connected(c.user, followee)
timeline = g.director.get_timeline(followee, page=kw.get('page', 0),
- limit=kw.get('limit', 100), actor_only=actor_only,
+ limit=kw.get('limit', 100),
+ actor_only=actor_only,
filter_func=perm_check(c.user))
return dict(followee=followee, following=following, timeline=timeline)
@@ -212,7 +212,12 @@ class ForgeActivityProfileSection(ProfileSectionBase):
self.activity_app = self.project.app_instance('activity')
def check_display(self):
- return self.activity_app is not None
+ app_installed = self.activity_app is not None
+ activity_enabled = config.get('activitystream.enabled', False)
+ activity_enabled = request.cookies.get(
+ 'activitystream.enabled', activity_enabled)
+ activity_enabled = asbool(activity_enabled)
+ return app_installed and activity_enabled
def prepare_context(self, context):
context.update({