launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04270
[Merge] lp:~danilo/launchpad/bug-790088 into lp:launchpad
Данило Шеган has proposed merging lp:~danilo/launchpad/bug-790088 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #790088 in Launchpad itself: "send-person-notifications.py crashing with permission denied on account"
https://bugs.launchpad.net/launchpad/+bug/790088
For more details, see:
https://code.launchpad.net/~danilo/launchpad/bug-790088/+merge/67938
= Bug 790088 =
send-person-notification.py fails for teams owned by other teams because access to "account" table for the DB user a script runs under ("personnotification") is impossible.
We add the "SELECT" privilege on "account" table for that user.
== Tests ==
bin/test -cvvt person-notification.txt
== Demo and Q/A ==
Merge a team owned by a team into another team and try out cronscripts/send-person-notifications.py.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
database/schema/security.cfg
lib/lp/registry/doc/person-notification.txt
--
https://code.launchpad.net/~danilo/launchpad/bug-790088/+merge/67938
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~danilo/launchpad/bug-790088 into lp:launchpad.
=== modified file 'database/schema/security.cfg'
--- database/schema/security.cfg 2011-07-08 18:46:51 +0000
+++ database/schema/security.cfg 2011-07-14 10:11:40 +0000
@@ -1538,6 +1538,7 @@
[personnotification]
groups=script
+public.account = SELECT
public.emailaddress = SELECT
public.libraryfilealias = SELECT
public.libraryfilecontent = SELECT
=== modified file 'lib/lp/registry/doc/person-notification.txt'
--- lib/lp/registry/doc/person-notification.txt 2011-05-19 04:18:07 +0000
+++ lib/lp/registry/doc/person-notification.txt 2011-07-14 10:11:40 +0000
@@ -66,9 +66,15 @@
>>> notification = notification_set.addNotification(
... mark, 'subject2', 'body2')
+
+This includes notifications to teams owned by other teams.
+
+ >>> owning_team = factory.makeTeam()
+ >>> team = factory.makeTeam(owner=owning_team)
+ >>> team_notification = notification_set.addNotification(
+ ... team, 'subject3', 'body3')
>>> [n.subject for n in notification_set.getNotificationsToSend()]
- [u'subject2']
-
+ [u'subject2', u'subject3']
>>> transaction.commit()
>>> import subprocess