dify/api/services
hjlarry 6b7574023e fix(workflow): enforce tenant access in online users query
Validate requested workflow_ids against current tenant before reading collaboration online-user state from Redis.

Move workflow access-id lookup into WorkflowService to keep controller thin and aligned with layering.

Limit query size, and stop exposing sid in REST response fields.

Add unit tests for inaccessible workflow filtering and workflow_ids limit checks.
2026-04-12 16:05:29 +08:00
..
auth chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
document_indexing_proxy feat: enable tenant isolation on duplicate document indexing tasks (#29080) 2025-12-08 17:54:57 +08:00
enterprise refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers (#34698) 2026-04-08 01:36:42 +00:00
entities refactor(api): deduplicate DSL shared entities into dsl_entities.py (#34762) 2026-04-09 06:04:18 +00:00
errors fix: enterprise API error handling and license enforcement (#33044) 2026-03-15 20:59:41 -07:00
plugin fix: sqlalchemy.orm.exc.DetachedInstanceError (#34910) 2026-04-10 07:44:22 +00:00
rag_pipeline refactor(services): replace Union with | syntax in service layer (#34905) 2026-04-10 07:44:47 +00:00
recommend_app refactor(api): type recommend app database retrieval dicts with TypedDicts (#34873) 2026-04-10 00:32:24 +00:00
retention refactor(api): use sessionmaker in end user, retention & cleanup services (#34765) 2026-04-08 23:21:28 +00:00
tools refactor(services): replace Union with | syntax in service layer (batch 2) (#34906) 2026-04-10 07:05:31 +00:00
trigger refactor: migrate session.query to select API in webhook service (#34849) 2026-04-09 14:16:33 +00:00
workflow refactor: convert AppMode if/elif to match/case in service files (#30001) (#34562) 2026-04-05 10:22:11 +00:00
__init__.py chore(api/services): apply ruff reformatting (#7599) 2024-08-26 13:43:57 +08:00
account_service.py fix: fix orm_exc.DetachedInstanceError (#34904) 2026-04-10 07:13:59 +00:00
advanced_prompt_template_service.py refactor: convert AppMode if/elif to match/case in service files (#30001) (#34562) 2026-04-05 10:22:11 +00:00
agent_service.py refactor: select in 10 service files (#34373) 2026-04-01 08:03:49 +00:00
annotation_service.py refactor: select in annotation_service (#34503) 2026-04-03 22:47:22 +00:00
api_based_extension_service.py refactor: select in 10 service files (#34373) 2026-04-01 08:03:49 +00:00
api_token_service.py fix: redis for api token (#31861) 2026-02-06 16:25:27 +08:00
app_dsl_service.py refactor: convert appmode misc if/elif to match/case (#30001) (#34869) 2026-04-10 00:35:12 +00:00
app_generate_service.py refactor(services): replace Union with | syntax in service layer (#34905) 2026-04-10 07:44:47 +00:00
app_model_config_service.py refactor: convert AppMode if/elif to match/case in service files (#30001) (#34562) 2026-04-05 10:22:11 +00:00
app_service.py refactor: select in 10 service files (#34373) 2026-04-01 08:03:49 +00:00
app_task_service.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
async_workflow_service.py refactor(services): replace Union with | syntax in service layer (batch 2) (#34906) 2026-04-10 07:05:31 +00:00
attachment_service.py refactor: migrate session.query to select API in sync task and services (#34619) 2026-04-07 04:23:14 +00:00
audio_service.py refactor: select in 13 small service files (#34371) 2026-04-01 04:00:05 +00:00
billing_service.py refactor: enhance billing info response handling (#34340) 2026-04-08 03:49:35 +00:00
clear_free_plan_tenant_expired_logs.py refactor(api): use sessionmaker in end user, retention & cleanup services (#34765) 2026-04-08 23:21:28 +00:00
code_based_extension_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
conversation_service.py chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
conversation_variable_updater.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
credit_pool_service.py refactor: use sessionmaker in small services 2 (#34696) 2026-04-08 05:06:50 +00:00
dataset_service.py fix(api): default parent_mode to paragraph for hierarchical chunking via API (#34635) 2026-04-10 10:55:40 +00:00
datasource_provider_service.py refactor(api): use sessionmaker in datasource provider service (#34811) 2026-04-09 05:43:13 +00:00
end_user_service.py refactor(api): use sessionmaker in end user, retention & cleanup services (#34765) 2026-04-08 23:21:28 +00:00
external_knowledge_service.py refactor(services): replace Union with | syntax in service layer (batch 2) (#34906) 2026-04-10 07:05:31 +00:00
feature_service.py Merge remote-tracking branch 'myori/main' into feat/collaboration2 2026-04-09 11:27:12 +08:00
feedback_service.py refactor: select in 10 service files (#34373) 2026-04-01 08:03:49 +00:00
file_service.py refactor(services): replace Union with | syntax in service layer (#34905) 2026-04-10 07:44:47 +00:00
hit_testing_service.py refactor(api): remove duplicated RAG entities from services layer (#34689) 2026-04-07 23:36:59 +00:00
human_input_delivery_test_service.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
human_input_service.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
knowledge_service.py refactor: replace dict with BedrockRetrievalSetting BaseModel in knowledge_service (#34080) 2026-03-25 21:33:24 +09:00
message_service.py chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
metadata_service.py refactor: select in metadata_service (#34479) 2026-04-02 12:34:38 +00:00
model_load_balancing_service.py refactor(services): replace Union with | syntax in service layer (batch 2) (#34906) 2026-04-10 07:05:31 +00:00
model_provider_service.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
oauth_server.py refactor: use sessionmaker in small services 2 (#34696) 2026-04-08 05:06:50 +00:00
operation_service.py more httpx (#25651) 2025-09-22 23:07:09 +08:00
ops_service.py refactor(api): type OpsTraceProviderConfigMap with TracingProviderCon… (#34424) 2026-04-02 01:47:08 +00:00
recommended_app_service.py refactor: select in 10 service files (#34373) 2026-04-01 08:03:49 +00:00
saved_message_service.py chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
summary_index_service.py refactor(api): type document summary status detail with TypedDict (#34610) 2026-04-07 01:00:39 +00:00
tag_service.py refactor: replace dict params with BaseModel payloads in TagService (#34422) 2026-04-07 04:20:02 +00:00
variable_truncator.py test: add unit tests for services and tasks part-4 (#33223) 2026-04-02 08:35:46 +00:00
vector_service.py refactor(api): remove duplicated RAG entities from services layer (#34689) 2026-04-07 23:36:59 +00:00
web_conversation_service.py chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
webapp_auth_service.py refactor: select in 13 small service files (#34371) 2026-04-01 04:00:05 +00:00
website_service.py refactor(api): type crawl status dicts with CrawlStatusDict TypedDict (#34611) 2026-04-07 01:01:04 +00:00
workflow_app_service.py chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
workflow_collaboration_service.py fix: py style and unittest 2026-04-11 20:25:03 +08:00
workflow_comment_service.py Merge branch 'feat/collaboration2' of github.com:langgenius/dify into feat/collaboration2 2026-04-10 15:46:17 +08:00
workflow_draft_variable_service.py refactor(api): use sessionmaker in workflow & RAG pipeline services (#34805) 2026-04-09 05:42:39 +00:00
workflow_event_snapshot_service.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
workflow_restore.py fix: adding a restore API for version control on workflow draft (#33582) 2026-03-20 14:54:23 +08:00
workflow_run_service.py feat(api): Introduce workflow pause state management (#27298) 2025-10-30 14:41:09 +08:00
workflow_service.py fix(workflow): enforce tenant access in online users query 2026-04-12 16:05:29 +08:00
workspace_service.py refactor: select in 13 small service files (#34371) 2026-04-01 04:00:05 +00:00