Skip to content
2 changes: 1 addition & 1 deletion ee/api/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def validate(self, data):


class ConversationViewSet(TeamAndOrgViewSetMixin, ListModelMixin, RetrieveModelMixin, GenericViewSet):
scope_object = "INTERNAL"
scope_object = "conversation"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skoob13 Is this ok to merge?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

serializer_class = ConversationSerializer
queryset = Conversation.objects.all()
lookup_url_kwarg = "conversation"
Expand Down
1 change: 1 addition & 0 deletions posthog/api/test/__snapshots__/test_api_docs.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# name: TestAPIDocsSchema.test_api_docs_generation_warnings_snapshot
list([
'',
'/home/runner/work/posthog/posthog/ee/api/conversation.py: Warning [ConversationViewSet]: could not derive type of path parameter "project_id" because model "ee.models.assistant.Conversation" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".',
'/home/runner/work/posthog/posthog/ee/api/dashboard_collaborator.py: Warning [DashboardCollaboratorViewSet]: could not derive type of path parameter "project_id" because model "ee.models.dashboard_privilege.DashboardPrivilege" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".',
"/home/runner/work/posthog/posthog/ee/api/max_tools.py: Error [MaxToolsViewSet]: exception raised while getting serializer. Hint: Is get_serializer_class() returning None or is get_queryset() not working without a request? Ignoring the view for now. (Exception: 'MaxToolsViewSet' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method.)",
'/home/runner/work/posthog/posthog/ee/api/max_tools.py: Warning [MaxToolsViewSet]: could not derive type of path parameter "project_id" because model "ee.models.assistant.Conversation" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".',
Expand Down
1 change: 1 addition & 0 deletions posthog/scopes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"batch_export",
"batch_import",
"cohort",
"conversation",
"dashboard",
"dashboard_template",
"dataset",
Expand Down
4 changes: 2 additions & 2 deletions posthog/settings/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ def static_varies_origin(headers, path, url):
"*": "Full access to all scopes",
**get_scope_descriptions(),
},
# Allow both http and https schemes to support localhost callbacks
# Allow http, https, and custom schemes to support localhost callbacks and native mobile apps
# Security validation in OAuthApplication.clean() ensures http is only allowed for loopback addresses (localhost, 127.0.0.0/8) in production
"ALLOWED_REDIRECT_URI_SCHEMES": ["http", "https"],
"ALLOWED_REDIRECT_URI_SCHEMES": ["http", "https", "posthog"],
"AUTHORIZATION_CODE_EXPIRE_SECONDS": 60 * 5,
# client has 5 minutes to complete the OAuth flow before the authorization code expires
"DEFAULT_SCOPES": ["openid"],
Expand Down
Loading