From 56e2243f3be7e859666ce0e4e1a8b8b94444f8d4 Mon Sep 17 00:00:00 2001
From: Jeremy Kerr <jk@ozlabs.org>
Date: Thu, 12 Aug 2010 12:15:48 +0800
Subject: Use generic email confirmation object

Rather than having a UserPerson-specific confirmation, add an
EmailConfirmation object to allow multiple types of confirmations (eg,
opt-out requests in future).

To do this, we use a view (patchwork.views.confirm) that will call the
type-specific view with the confirmation object.

Also, add tests to check that the User/Person linkage system works.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
 lib/sql/grant-all.mysql.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lib/sql/grant-all.mysql.sql')

diff --git a/lib/sql/grant-all.mysql.sql b/lib/sql/grant-all.mysql.sql
index 4dd6efb..f60c6b8 100644
--- a/lib/sql/grant-all.mysql.sql
+++ b/lib/sql/grant-all.mysql.sql
@@ -12,7 +12,7 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON auth_user_groups TO 'www-data'@localhost
 GRANT SELECT, UPDATE, INSERT, DELETE ON auth_group TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON auth_user_user_permissions TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON auth_permission TO 'www-data'@localhost;
-GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_userpersonconfirmation TO 'www-data'@localhost;
+GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_emailconfirmation TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_state TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_comment TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_person TO 'www-data'@localhost;
-- 
cgit v1.2.3


From c2c6a408c7764fa29389ce160f52776c9308d50a Mon Sep 17 00:00:00 2001
From: Jeremy Kerr <jk@ozlabs.org>
Date: Sun, 31 Oct 2010 19:29:29 -0400
Subject: registration: use EmailConfimation rather than separate registration
 app

Since we have infrastructure for email confirmations, we no longer need
the separate registration app.

Requires a migration script, which will delete all inactive users,
including those newly added and pending confirmation. Use carefully.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
 lib/sql/grant-all.mysql.sql | 1 -
 1 file changed, 1 deletion(-)

(limited to 'lib/sql/grant-all.mysql.sql')

diff --git a/lib/sql/grant-all.mysql.sql b/lib/sql/grant-all.mysql.sql
index f60c6b8..a3d758c 100644
--- a/lib/sql/grant-all.mysql.sql
+++ b/lib/sql/grant-all.mysql.sql
@@ -22,7 +22,6 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_project TO 'www-data'@localhos
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_bundle TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_bundle_patches TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patch TO 'www-data'@localhost;
-GRANT SELECT, UPDATE, INSERT, DELETE ON registration_registrationprofile TO 'www-data'@localhost;
 
 -- allow the mail user (in this case, 'nobody') to add patches
 GRANT INSERT, SELECT ON patchwork_patch TO 'nobody'@localhost;
-- 
cgit v1.2.3


From 41f19b6643b44768dc06561c992c04ed6148477d Mon Sep 17 00:00:00 2001
From: Jeremy Kerr <jk@ozlabs.org>
Date: Wed, 11 Aug 2010 14:16:28 +0800
Subject: Add email opt-out system

We're going to start generating emails on patchwork updates, so firstly
allow people to opt-out of all patchwork communications.

We do this with a 'mail settings' interface, allowing non-registered
users to set preferences on their email address. Logged-in users can do
this through the user profile view.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
 lib/sql/grant-all.mysql.sql | 1 +
 1 file changed, 1 insertion(+)

(limited to 'lib/sql/grant-all.mysql.sql')

diff --git a/lib/sql/grant-all.mysql.sql b/lib/sql/grant-all.mysql.sql
index a3d758c..c272e1e 100644
--- a/lib/sql/grant-all.mysql.sql
+++ b/lib/sql/grant-all.mysql.sql
@@ -22,6 +22,7 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_project TO 'www-data'@localhos
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_bundle TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_bundle_patches TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patch TO 'www-data'@localhost;
+GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_emailoptout TO 'www-data'@localhost;
 
 -- allow the mail user (in this case, 'nobody') to add patches
 GRANT INSERT, SELECT ON patchwork_patch TO 'nobody'@localhost;
-- 
cgit v1.2.3


From 798a73b8bfb41f742e78e481ab9c961556e117b3 Mon Sep 17 00:00:00 2001
From: Jeremy Kerr <jk@ozlabs.org>
Date: Tue, 29 Mar 2011 11:58:39 +0800
Subject: models: Add PatchChangeNotification and record patch state changes

Add a PatchChangeNotification model to keep track of changes to a
patch's state. Hook this up to Patch's pre_save signal.

Requires a DB schema upgrade.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
 lib/sql/grant-all.mysql.sql | 1 +
 1 file changed, 1 insertion(+)

(limited to 'lib/sql/grant-all.mysql.sql')

diff --git a/lib/sql/grant-all.mysql.sql b/lib/sql/grant-all.mysql.sql
index c272e1e..1bff526 100644
--- a/lib/sql/grant-all.mysql.sql
+++ b/lib/sql/grant-all.mysql.sql
@@ -23,6 +23,7 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_bundle TO 'www-data'@localhost
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_bundle_patches TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patch TO 'www-data'@localhost;
 GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_emailoptout TO 'www-data'@localhost;
+GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patchchangenotification TO 'www-data'@localhost;
 
 -- allow the mail user (in this case, 'nobody') to add patches
 GRANT INSERT, SELECT ON patchwork_patch TO 'nobody'@localhost;
-- 
cgit v1.2.3

