From: Torsten Werner Date: Thu, 19 Nov 2009 22:19:01 +0000 (+0100) Subject: queue: fix sponsored uploads X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c8ada5acf252e294c002df6aa4820dbb19aad31;p=dak queue: fix sponsored uploads --- diff --git a/daklib/queue.py b/daklib/queue.py index e39b72d6..67e6563c 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -1445,16 +1445,15 @@ class Upload(object): self.check_dm_upload(fpr, session) else: # Check source-based permissions for other types - if self.pkg.changes["architecture"].has_key("source"): - if fpr.source_acl.access_level is None: - rej = 'Fingerprint %s may not upload source' % fpr.fingerprint - rej += '\nPlease contact ftpmaster if you think this is incorrect' - self.rejects.append(rej) - return - else: - # If not a DM, we allow full upload rights - uid_email = "%s@debian.org" % (fpr.uid.uid) - self.check_if_upload_is_sponsored(uid_email, fpr.uid.name) + if self.pkg.changes["architecture"].has_key("source") and \ + fpr.source_acl.access_level is None: + rej = 'Fingerprint %s may not upload source' % fpr.fingerprint + rej += '\nPlease contact ftpmaster if you think this is incorrect' + self.rejects.append(rej) + return + # If not a DM, we allow full upload rights + uid_email = "%s@debian.org" % (fpr.uid.uid) + self.check_if_upload_is_sponsored(uid_email, fpr.uid.name) # Check binary upload permissions