~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/archiveuploader/dscfile.py

  • Committer: Steve Kowalik
  • Date: 2012-01-05 03:59:54 UTC
  • mto: This revision was merged to the branch mainline in revision 14637.
  • Revision ID: steve.kowalik@canonical.com-20120105035954-3slokx1abu950l0y
Reject uploads that have maintainers set as private teams.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2012 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
""" DSCFile and related.
199
199
            raise UploadError(str(error))
200
200
 
201
201
        person = getUtility(IPersonSet).getByEmail(email)
 
202
        if person and person.private:
 
203
            # Private teams can not be maintainers.
 
204
            error = "Invalid Maintainer."
 
205
            if self.changes.changed_by and self.changes.changed_by['person']:
 
206
                if self.changes.changed_by['person'].inTeam(person):
 
207
                    error = "Maintainer can not be set to a private team."
 
208
            raise UploadError(error)
 
209
 
202
210
        if person is None and self.policy.create_people:
203
211
            package = self._dict['Source']
204
212
            version = self._dict['Version']