|
|
@ -90,4 +90,7 @@ class UlohaVzorakNodeViewSet(PermissionMixin, viewsets.ModelViewSet): |
|
|
|
nazev = self.request.query_params.get('nazev',None) |
|
|
|
if nazev is not None: |
|
|
|
queryset = queryset.filter(nazev__contains=nazev) |
|
|
|
return queryset |
|
|
|
if self.request.user.has_perm('auth.org'): |
|
|
|
return queryset |
|
|
|
else: # pro neorgy jen zveřejněné vzoráky |
|
|
|
return queryset.filter(uloha__cislo_reseni__verejne_db=True) |
|
|
|