From 33070ed911a44b9a94945bdd4172c8906f19943d Mon Sep 17 00:00:00 2001 From: Ben White Date: Mon, 25 Mar 2024 11:40:07 +0100 Subject: [PATCH] Fixes --- ee/api/rbac/access_control.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ee/api/rbac/access_control.py b/ee/api/rbac/access_control.py index 6173ccee28e06..156b5c3881adc 100644 --- a/ee/api/rbac/access_control.py +++ b/ee/api/rbac/access_control.py @@ -1,13 +1,10 @@ -from typing import Union, cast +from typing import cast -from django.db.models.query import QuerySet, RawQuerySet from rest_framework import exceptions, serializers, status from rest_framework.decorators import action -from rest_framework.filters import BaseFilterBackend from rest_framework.request import Request from rest_framework.response import Response -from rest_framework.views import APIView from ee.models.rbac.access_control import AccessControl from posthog.models.personal_api_key import API_SCOPE_OBJECTS @@ -91,6 +88,7 @@ class AccessControlViewSetMixin: # 2. Get the actual object which we can pass to the serializer to check if the user created it # 3. We can also use the serializer to check the access level for the object + # TODO: Probably move this to the TeamAndOrgViewSetMixin def filter_queryset(self, queryset): queryset = super().filter_queryset(queryset) # TODO: Detect GET param to include hidden resources (for admins)