[Patchew-devel] [PATCH v2] rest: add api/v1/messages endpoint (POST support)
Paolo Bonzini
pbonzini at redhat.com
Tue May 15 12:08:45 UTC 2018
On 15/05/2018 14:02, Shubham Jain wrote:
> + def create(self, request, *args, **kwargs):
> + projects = [p for p in Project.objects.all() if p.recognizes(MboxMessage(self.request.data['mbox']))]
> + if 'importers' not in self.request.user.groups.all():
> + projects = set(projects) & set([p for p in Project.objects.all() if p.maintained_by(self.request.user)])
This can be just "projects = (p for p in projects if
p.maintained_by(self.request_user))". I'll make the change and commit it.
Fam, what do you think should Admin accounts do? Import only to the
projects they maintain, or to all of them?
Thanks,
Paolo
More information about the Patchew-devel
mailing list