Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Dec 13, 2024
1 parent 49f1ad0 commit 14049d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 60 deletions.
2 changes: 1 addition & 1 deletion posthog/api/client_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from rest_framework.throttling import AnonRateThrottle, UserRateThrottle

from posthog.models.api_scopes import ALL_API_SCOPES
from posthog.models.scopes import ALL_API_SCOPES

DEFAULT_CLIENT_AUTHENTICATION_TIME = timedelta(days=7)

Expand Down
59 changes: 0 additions & 59 deletions posthog/models/api_scopes.py

This file was deleted.

5 changes: 5 additions & 0 deletions posthog/models/scopes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"export",
"feature_flag",
"group",
"heatmaps",
"insight",
"query", # Covers query and events endpoints
"notebook",
Expand Down Expand Up @@ -58,3 +59,7 @@

API_SCOPE_OBJECTS: tuple[APIScopeObject, ...] = get_args(APIScopeObject)
API_SCOPE_ACTIONS: tuple[APIScopeActions, ...] = get_args(APIScopeActions)

ALL_API_SCOPES: tuple[str, ...] = tuple(
f"{object}:{action}" for object in API_SCOPE_OBJECTS for action in API_SCOPE_ACTIONS
)

0 comments on commit 14049d8

Please sign in to comment.