Merge lp:~salgado/offspring/ssh-key into lp:offspring

Proposed by Guilherme Salgado
Status: Merged
Merged at revision: 99
Proposed branch: lp:~salgado/offspring/ssh-key
Merge into: lp:offspring
Prerequisite: lp:~salgado/offspring/private-projects
Diff against target: 43 lines (+17/-0)
3 files modified
lib/offspring/master/models.py (+6/-0)
lib/offspring/web/queuemanager/models.py (+9/-0)
migration/002-bzr-ssh-user-key.sql (+2/-0)
To merge this branch: bzr merge lp:~salgado/offspring/ssh-key
Reviewer Review Type Date Requested Status
Kevin McDermott Needs Fixing
Review via email: mp+83952@code.launchpad.net

Description of the change

Add .ssh_key and .lp_user to Project

To post a comment you must log in.
Revision history for this message
Kevin McDermott (bigkevmcd) wrote :

There's a typo ;-)

+ # per LaunchpadProject, anyone who could create a Project referencing that

I'd prefer to see this rolled up into the lp:~salgado/offspring/passing-ssh-key-to-slave branch.

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/offspring/master/models.py'
2--- lib/offspring/master/models.py 2011-09-20 18:58:04 +0000
3+++ lib/offspring/master/models.py 2011-11-30 14:34:38 +0000
4@@ -165,6 +165,12 @@
5 status = Unicode()
6 config_url = Unicode()
7 notes = Unicode()
8+
9+ # The Launchpad User and SSH key are stored per project. If we stored them
10+ # per LauncpadProject, anyone who could create a Project referencing that
11+ # LaunchpadProject could get access to the private data in it.
12+ lp_user = Unicode()
13+ lp_ssh_key = Unicode()
14
15 def __init__(self, name, priority=40):
16 self.title = unicode(name.capitalize())
17
18=== modified file 'lib/offspring/web/queuemanager/models.py'
19--- lib/offspring/web/queuemanager/models.py 2011-11-30 14:34:38 +0000
20+++ lib/offspring/web/queuemanager/models.py 2011-11-30 14:34:38 +0000
21@@ -218,6 +218,15 @@
22 launchpad_project = models.ForeignKey("LaunchpadProject", blank=True, null=True)
23 status = models.CharField('status', max_length=200, null=True, choices=STATUS_CHOICES)
24 config_url = models.CharField('config URL', max_length=200) # Add some kind of validator here.
25+
26+ # The Launchpad User and SSH key are stored per project. If we stored them
27+ # per LauncpadProject, anyone who could create a Project referencing that
28+ # LaunchpadProject could get access to the private data in it.
29+ lp_user = models.TextField('Launchpad User', null=True, editable=False,
30+ blank=True)
31+ lp_ssh_key = models.TextField("Launchpad User's SSH Key", blank=True,
32+ null=True, editable=False)
33+
34 notes = models.TextField(blank=True, null=True)
35
36 class Meta:
37
38=== added file 'migration/002-bzr-ssh-user-key.sql'
39--- migration/002-bzr-ssh-user-key.sql 1970-01-01 00:00:00 +0000
40+++ migration/002-bzr-ssh-user-key.sql 2011-11-30 14:34:38 +0000
41@@ -0,0 +1,2 @@
42+ALTER TABLE projects ADD COLUMN "lp_user" text;
43+ALTER TABLE projects ADD COLUMN "lp_ssh_key" text;

Subscribers

People subscribed via source and target branches