Merge lp:~jml/launchpad/db-distro-level-ppa-privacy into lp:launchpad/db-devel

Proposed by Jonathan Lange
Status: Rejected
Rejected by: Jonathan Lange
Proposed branch: lp:~jml/launchpad/db-distro-level-ppa-privacy
Merge into: lp:launchpad/db-devel
Diff against target: 28 lines (+12/-1)
2 files modified
database/schema/comments.sql (+1/-1)
database/schema/patch-2209-22-1.sql (+11/-0)
To merge this branch: bzr merge lp:~jml/launchpad/db-distro-level-ppa-privacy
Reviewer Review Type Date Requested Status
Curtis Hovey entitlement Pending
Robert Collins db Pending
Stuart Bishop db Pending
Launchpad code reviewers Pending
Review via email: mp+109336@code.launchpad.net

Commit message

Add private_archive_creator column to Distribution, controlling who can create private archives.

Description of the change

Adds a column to Distribution to control who can create private archives (i.e. P3As, private PPAs) for that distribution (currently Ubuntu only).

The plan is to follow this up with patches that:
 * allow certain folk to view and update this value via the API
 * update tests to say "I need to permissions to create private PPAs" rather than "I must be a commercial admin"
 * change PPA creation to consult this value rather than the commercial_admin celebrity
 * (possibly) make this value control whether launchpad.Commercial is granted on a distribution [it's unclear what that permission means]

No restrictions on when this lands, afaik.

To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

I should add that the goal here is for my team to be able to create PPAs without hassling existing commercial admins and without acquiring the v. high level of privilege and permission that commercial_admin grants.

Revision history for this message
Jonathan Lange (jml) wrote :

On IRC, wgrant strongly insisted that sinzui should be consulted about this.

Also, my email logs say that lifeless suggested a celebrity (See email May 1st to launchpad-dev). I have no idea how it became a database column in my todo list.

Revision history for this message
Jonathan Lange (jml) wrote :

I've spoken with sinzui on IRC. In a nutshell, here's the behaviour we want

 1. if the team owning the PPA is private, and you're in the team:
   a) you are allowed to create a private PPA
   b) you are not allowed to create a public PPA

 2. if you are allowed to create private things on LP, then you are be allowed to create private PPAs for public teams

   * "you are allowed to create private things" == you.checkAllowVisibility()
   * True if admin, commercial admin or they have a commercial subscription
   * used currently for whether to show checkbox on private teams

 3. otherwise, you are not allowed to create private PPAs

This does not require a database patch and does not require a celebrity. I'll proceed with this implementation approach on Monday if I don't hear otherwise.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/schema/comments.sql'
2--- database/schema/comments.sql 2012-05-23 02:26:26 +0000
3+++ database/schema/comments.sql 2012-06-08 12:02:26 +0000
4@@ -1128,7 +1128,7 @@
5 COMMENT ON COLUMN Distribution.official_rosetta IS 'Whether or not this distribution uses Rosetta for its official translation team and coordination.';
6 COMMENT ON COLUMN Distribution.official_malone IS 'Whether or not this distribution uses Malone for an official bug tracker.';
7 COMMENT ON COLUMN Distribution.official_answers IS 'Whether or not this product upstream uses Answers officialy.';
8-
9+COMMENT ON COLUMN Distribution.private_archive_creator IS 'Person or Team who can create private archives for this distribution.';
10 COMMENT ON COLUMN Distribution.translation_focus IS 'The DistroSeries that should get the translation effort focus.';
11 COMMENT ON COLUMN Distribution.language_pack_admin IS 'The Person or Team that handle language packs for the distro release.';
12 COMMENT ON COLUMN Distribution.enable_bug_expiration IS 'Indicates whether automatic bug expiration is enabled.';
13
14=== added file 'database/schema/patch-2209-22-1.sql'
15--- database/schema/patch-2209-22-1.sql 1970-01-01 00:00:00 +0000
16+++ database/schema/patch-2209-22-1.sql 2012-06-08 12:02:26 +0000
17@@ -0,0 +1,11 @@
18+-- Copyright 2012 Canonical Ltd. This software is licensed under the
19+-- GNU Affero General Public License version 3 (see the file LICENSE).
20+
21+SET client_min_messages=ERROR;
22+
23+ALTER TABLE Distribution
24+ADD COLUMN private_archive_creator INTEGER
25+ CONSTRAINT distribution__private_archive_creator__fk
26+ REFERENCES Person;
27+
28+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 22, 1);

Subscribers

People subscribed via source and target branches

to status/vote changes: