incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/4] git commit: [#7204] Order user projects list by name
Date Tue, 04 Mar 2014 16:47:23 GMT
Repository: incubator-allura
Updated Branches:
  refs/heads/master fe0aa1678 -> da9227258


[#7204] Order user projects list by name

Signed-off-by: Cory Johns <cjohns@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/a81b7921
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a81b7921
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a81b7921

Branch: refs/heads/master
Commit: a81b79216c29aff6a6a199d322d4ee97c6125eec
Parents: fe0aa16
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Fri Feb 28 22:51:08 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Mar 4 16:46:56 2014 +0000

----------------------------------------------------------------------
 Allura/allura/ext/user_profile/user_main.py | 5 ++++-
 Allura/allura/model/auth.py                 | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a81b7921/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 9a9e5f1..881a9ec 100644
--- a/Allura/allura/ext/user_profile/user_main.py
+++ b/Allura/allura/ext/user_profile/user_main.py
@@ -296,7 +296,10 @@ class ProjectsSection(ProfileSectionBase):
         context['projects'] = [
             project
             for project in self.user.my_projects()
-            if project != c.project and (self.user == c.user or h.has_access(project, 'read'))]
+            if project != c.project
+            and (self.user == c.user or h.has_access(project, 'read'))
+            and not project.is_nbhd_project
+            and not project.is_user_project]
         return context
 
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a81b7921/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index fbb06bc..4e93581 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -706,7 +706,7 @@ class User(MappedClass, ActivityNode, ActivityObject):
         # filter out projects to which the user belongs to no named groups (i.e., role['roles']
is empty)
         projects = [r['project_id'] for r in roles if r['roles']]
         from .project import Project
-        return Project.query.find({'_id': {'$in': projects}, 'deleted': False}).sort('last_updated',
pymongo.DESCENDING)
+        return Project.query.find({'_id': {'$in': projects}, 'deleted': False}).sort('name',
pymongo.ASCENDING)
 
     def my_projects_by_role_name(self, role_name):
         """


Mime
View raw message