[Patchew-devel] [PATCH] test: more testcases around authorization

Fam Zheng famz at redhat.com
Fri May 18 02:04:45 UTC 2018


On Thu, 05/17 22:55, Shubham Jain wrote:
> > > +        if request.user.is_superuser or 'importers' in user_group_names:
> > > +            projects = [p for p in Project.objects.all() if
> > p.recognizes(m)]
> > > +        else:
> > > +            projects =  [p for p in Project.objects.all() if
> > p.maintained_by(self.request.user)]
> >
> > I think the else branch should still union the p.recognizes() filtering.

Wrong term. I meant "intersect".

> >
> As you have mentioned in the test case below
> "test_maintainer_of_project_x_import_a_patch_to_project_y()", does this

And this is actually
"test_maintainer_of_project_x_cannot_import_a_patch_to_project_y().

Fam




More information about the Patchew-devel mailing list