launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #23400
Re: [Merge] lp:~cjwatson/launchpad/archive-subscriber-refactor-cancel into lp:launchpad
Diff comments:
>
> === modified file 'lib/lp/soyuz/model/archivesubscriber.py'
> --- lib/lp/soyuz/model/archivesubscriber.py 2015-09-23 15:38:13 +0000
> +++ lib/lp/soyuz/model/archivesubscriber.py 2019-03-08 17:05:57 +0000
> @@ -94,9 +97,7 @@
>
> def cancel(self, cancelled_by):
> """See `IArchiveSubscriber`."""
> - self.date_cancelled = UTC_NOW
> - self.cancelled_by = cancelled_by
> - self.status = ArchiveSubscriberStatus.CANCELLED
> + ArchiveSubscriberSet().cancel([self.id], cancelled_by)
I'd taken this approach because IArchiveSubscriberSet.cancel has much stricter permissions. But it's probably better to be explicit about what we're doing here, so I've changed this to removeSecurityProxy(getUtility(IArchiveSubscriberSet)).cancel with an explanatory comment.
>
> def getNonActiveSubscribers(self):
> """See `IArchiveSubscriber`."""
--
https://code.launchpad.net/~cjwatson/launchpad/archive-subscriber-refactor-cancel/+merge/364169
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
References