allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [24/46] git commit: [#5973] don't install ForgeActivity app if it's not enabled
Date Wed, 03 Apr 2013 17:26:53 GMT
[#5973] don't install ForgeActivity app if it's not enabled


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

Branch: refs/heads/cj/5879
Commit: a86b081d5bdf4a32a5fe0d93bd1aa2ffc8927ba4
Parents: 3004b5f
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Thu Mar 14 13:20:20 2013 -0400
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/project.py |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a86b081d/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 9f07f67..39509ff 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -5,6 +5,7 @@ from datetime import datetime
 from tg import config
 from pylons import tmpl_context as c, app_globals as g
 from pylons import request
+from paste.deploy.converters import asbool
 
 from ming import schema as S
 from ming.utils import LazyProperty
@@ -709,16 +710,17 @@ class Project(MappedClass, ActivityNode, ActivityObject):
         self.notifications_disabled = True
         if users is None: users = [ c.user ]
         if apps is None:
+            apps = []
             if is_user_project:
-                apps = [('Wiki', 'wiki', 'Wiki'),
+                apps += [('Wiki', 'wiki', 'Wiki'),
                         ('profile', 'profile', 'Profile'),
-                        ('admin', 'admin', 'Admin'),
-                        ('search', 'search', 'Search'),
-                        ('activity', 'activity', 'Activity')]
-            else:
-                apps = [('admin', 'admin', 'Admin'),
-                        ('search', 'search', 'Search'),
-                        ('activity', 'activity', 'Activity')]
+                       ]
+            apps += [
+                ('admin', 'admin', 'Admin'),
+                ('search', 'search', 'Search'),
+            ]
+            if asbool(config.get('activitystream.enabled', False)):
+                apps.append(('activity', 'activity', 'Activity'))
         with h.push_config(c, project=self, user=users[0]):
             # Install default named roles (#78)
             root_project_id=self.root_project._id


Mime
View raw message