[Patchew-devel] [PATCH] git: require maintainership to edit configuration

Fam Zheng famz at redhat.com
Thu Mar 8 07:56:41 UTC 2018


On Thu, Mar 8, 2018 at 3:51 PM, Paolo Bonzini <pbonzini at redhat.com> wrote:
> git info must not be visible without authentication.  Use maintained_by
> as in other prepare_project_hook
>
> Fixes: f845f6359ae939d72c40db46710d676755944b0a
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> ---
>  mods/git.py | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/mods/git.py b/mods/git.py
> index df4185a..cda42dd 100644
> --- a/mods/git.py
> +++ b/mods/git.py
> @@ -193,6 +193,8 @@ class GitModule(PatchewModule):
>                                           })
>
>      def prepare_project_hook(self, request, project):
> +        if not project.maintained_by(request.user):
> +            return
>          project.extra_info.append({"title": "Git configuration",
>                                     "class": "info",
>                                     "content_html": self.build_config_html(request,


Applied, thanks.




More information about the Patchew-devel mailing list