Skip to content

Commit

Permalink
fix(flags): toolbar can override disabled flags (#18459)
Browse files Browse the repository at this point in the history
  • Loading branch information
liyiy authored Nov 7, 2023
1 parent 747597e commit f79b924
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions posthog/api/feature_flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
from posthog.models.cohort import Cohort
from posthog.models.cohort.util import get_dependent_cohorts
from posthog.models.feature_flag import (
FeatureFlagMatcher,
FeatureFlagDashboards,
can_user_edit_feature_flag,
get_all_feature_flags,
Expand Down Expand Up @@ -460,7 +459,7 @@ def my_flags(self, request: request.Request, **kwargs):
raise exceptions.NotAuthenticated()

feature_flags = (
FeatureFlag.objects.filter(team=self.team, active=True, deleted=False)
FeatureFlag.objects.filter(team=self.team, deleted=False)
.prefetch_related("experiment_set")
.prefetch_related("features")
.prefetch_related("analytics_dashboards")
Expand All @@ -476,7 +475,7 @@ def my_flags(self, request: request.Request, **kwargs):
if not feature_flag_list:
return Response(flags)

matches, _, _, _ = FeatureFlagMatcher(feature_flag_list, request.user.distinct_id, groups).get_matches()
matches, _, _, _ = get_all_feature_flags(self.team_id, request.user.distinct_id, groups)
for feature_flag in feature_flags:
flags.append(
{
Expand Down

0 comments on commit f79b924

Please sign in to comment.