I solved this using

def get_queryset(self, request):
    qs = super(TrackingAdmin, self).get_queryset(request)
    return qs.filter(company__in=list(request.user.groups.all()))


*Sorry for the duplicate post*



On Monday, November 9, 2015 at 11:28:50 AM UTC-5, frocco wrote:
>
> Hi,
>
> I want to deploy an admin app that only allows records with company=A to 
> users in group A
> and allows records with company=B to users in group B
>
> Is this possible?
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/46d32f00-e325-41bb-9af4-0147b17c25c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to