launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #26842
Re: [Merge] ~pappacena/launchpad:ocirecipe-list-on-person into launchpad:master
Pushed requested changes.
Diff comments:
> diff --git a/lib/lp/oci/browser/ocirecipe.py b/lib/lp/oci/browser/ocirecipe.py
> index 5eee7e3..4d526ff 100644
> --- a/lib/lp/oci/browser/ocirecipe.py
> +++ b/lib/lp/oci/browser/ocirecipe.py
> @@ -204,7 +204,9 @@ class OCIRecipeContextMenu(ContextMenu):
>
>
> class OCIProjectRecipesView(LaunchpadView):
> - """Default view for the list of OCI recipes of an OCI project."""
> + """Default view for the list of OCI recipes of a context (OCI project
> + or Person).
> + """
Ok! Renaming it!
> page_title = 'Recipes'
>
> @property
> diff --git a/lib/lp/oci/model/ocirecipe.py b/lib/lp/oci/model/ocirecipe.py
> index 2a5598a..1397837 100644
> --- a/lib/lp/oci/model/ocirecipe.py
> +++ b/lib/lp/oci/model/ocirecipe.py
> @@ -875,6 +877,14 @@ class OCIRecipeSet:
> OCIRecipe.oci_project == oci_project,
> get_ocirecipe_privacy_filter(visible_by_user))
>
> + def findByContext(self, context, visible_by_user):
> + if IPerson.providedBy(context):
> + return self.findByOwner(context).find(
> + get_ocirecipe_privacy_filter(visible_by_user))
> + if IOCIProject.providedBy(context):
Ok!
> + return self.findByOCIProject(context, visible_by_user)
> + raise NotImplementedError("Unknown OCI recipe context: %s" % context)
> +
> def findByGitRepository(self, repository, paths=None):
> """See `IOCIRecipeSet`."""
> clauses = [OCIRecipe.git_repository == repository]
--
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/400214
Your team Launchpad code reviewers is subscribed to branch ~pappacena/launchpad:ocirecipe-filter-private.
References