quick-window-91705
10/24/2025, 6:44 PMwooden-umbrella-84098
10/24/2025, 6:52 PMquick-window-91705
10/24/2025, 6:53 PMwooden-umbrella-84098
10/24/2025, 7:01 PMstraight-sundown-84319
10/24/2025, 7:01 PMstraight-sundown-84319
10/24/2025, 7:02 PMquick-window-91705
10/24/2025, 7:04 PMif is_saas():
org_id = Column(SQL_UUID(as_uuid=True), ForeignKey('org.id'), nullable=True)
org = relationship('Org', back_populates='conversation_metadata')calm-artist-7206
10/24/2025, 8:01 PMquick-window-91705
10/24/2025, 8:03 PMcalm-artist-7206
10/24/2025, 8:30 PMhas_same_org(user) or maybe
``````calm-artist-7206
10/24/2025, 9:47 PMstraight-sundown-84319
10/24/2025, 10:29 PMuser_id from the OSS table
• We create a migration in enterprise/migrations/versions to add the org_id to the enterprise table
• We rename the SQLAppConversationInfoService to OSSAppConversationInfoService and have its secure_select method simply return select(StoredConversationMetadata) . We do similarly with the save_app_conversation_info method and any other reference to user_id
• We create a SAASAppConversationInfoService which impelements filtering by user_id / org_id. (Probably a subclass of OSSAppConversationInfoService)
• We create replacements for SQLAppConversationInfoServiceInjector - the SAAS one obviously injects the user_context.
• We check the app_mode here, and initialize the appropriate injectorcalm-artist-7206
10/24/2025, 10:40 PMuser_id, but does not get org_id
• => adds a JOIN in various queries that need the "sharing" functionalitystraight-sundown-84319
10/24/2025, 10:40 PMstraight-sundown-84319
10/24/2025, 10:40 PMstraight-sundown-84319
10/24/2025, 10:41 PMstraight-sundown-84319
10/24/2025, 10:41 PMcalm-artist-7206
10/24/2025, 10:45 PMcalm-artist-7206
10/24/2025, 10:48 PMstraight-sundown-84319
10/24/2025, 10:49 PMcalm-artist-7206
10/24/2025, 10:54 PMcalm-artist-7206
10/24/2025, 10:54 PMstraight-sundown-84319
10/24/2025, 10:56 PMstraight-sundown-84319
10/24/2025, 10:56 PMquick-window-91705
10/24/2025, 11:17 PMcalm-artist-7206
10/24/2025, 11:35 PMcalm-artist-7206
10/27/2025, 8:08 PMnutritious-balloon-65098
10/27/2025, 8:27 PMnutritious-balloon-65098
10/27/2025, 8:36 PMnutritious-balloon-65098
10/27/2025, 9:04 PM