allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [3/7] git commit: don't install ForgeActivity app if it's not enabled
Date Thu, 14 Mar 2013 20:23:08 GMT
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/1137dc34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1137dc34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1137dc34

Branch: refs/heads/db/5973
Commit: 1137dc342f23bc0ed27865540a9fb355ff6d009f
Parents: 3d7f4df
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Thu Mar 14 13:20:20 2013 -0400
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Thu Mar 14 13:20:20 2013 -0400

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


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1137dc34/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