← Back to team overview

launchpad-reviewers team mailing list archive

lp:~cjwatson/launchpad/remove-security-uploadpolicy-restriction into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-security-uploadpolicy-restriction into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/remove-security-uploadpolicy-restriction/+merge/115739

== Summary ==

There is a restriction in archiveuploader preventing direct uploads to -security.  This dates from 2006, specifically from the days when -security was managed outside Launchpad and so it would have been bad to accept direct uploads.  Nowadays it so happens that the security team always stages uploads in a PPA and copies them over, and I don't think there's any particular drive to change that, but contrariwise there's no reason to keep this code fossil either.  It looks as though it was simply forgotten when the security upload policy was removed in r11450.

== Proposed fix ==

Just drop the check.

== Tests ==

bin/test -vvct archiveuploader
-- 
https://code.launchpad.net/~cjwatson/launchpad/remove-security-uploadpolicy-restriction/+merge/115739
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-security-uploadpolicy-restriction into lp:launchpad.
=== modified file 'lib/lp/archiveuploader/uploadpolicy.py'
--- lib/lp/archiveuploader/uploadpolicy.py	2012-07-03 11:52:24 +0000
+++ lib/lp/archiveuploader/uploadpolicy.py	2012-07-19 13:40:51 +0000
@@ -245,17 +245,9 @@
             pass
 
     def policySpecificChecks(self, upload):
-        """The insecure policy does not allow SECURITY uploads for now.
-
-        If the upload is targeted to any PPA, checks if the upload is within
-        the allowed quota.
-        """
+        """Check that PPA uploads are within the allowed quota."""
         if upload.is_ppa:
             self.checkArchiveSizeQuota(upload)
-        else:
-            if self.pocket == PackagePublishingPocket.SECURITY:
-                upload.reject(
-                    "This upload queue does not permit SECURITY uploads.")
 
     def autoApprove(self, upload):
         """The insecure policy auto-approves RELEASE/PROPOSED pocket stuff.


Follow ups