~sloecode/sloecode/1.0

« back to all changes in this revision

Viewing changes to sloecode/controllers/xmlrpc.py

  • Committer: Thomi Richards
  • Date: 2012-03-04 04:35:48 UTC
  • mfrom: (109.1.36 trunk)
  • Revision ID: thomi.richards@canonical.com-20120304043548-xlo68ox0cckxeph1
Merged from trunk, in preparation with 1.1 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
from pylons.controllers.xmlrpc import XMLRPCController
7
7
from sloecode.model import Person, Project
 
8
from sloecode.model.project import public_projects
8
9
from sloecode.model.site_role import PROJECT_ADMIN
9
10
from sloecode.model.membership import PR_DEVELOPER, PR_MANAGER
10
11
 
79
80
                    writable_projects.append(mem.project.name)
80
81
                else:
81
82
                    readable_projects.append(mem.project.name)
 
83
            for project in public_projects():
 
84
                if project.name in writable_projects:
 
85
                    continue
 
86
                if project.name in readable_projects:
 
87
                    continue
 
88
                readable_projects.append(project.name)
82
89
        return [isAdmin, readable_projects, writable_projects]
83
90
 
84
91
    getAccessPermissionsForUser.signature = [['array', 'string']]