Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: add export permission (#5841)

Joe59ad091e6973
diff --git a/api/controllers/console/app/app.py b/api/controllers/console/app/app.py
index 1a38bcba7e4..fb3205813d4 100644
--- a/api/controllers/console/app/app.py
+++ b/api/controllers/console/app/app.py
@@ -190,6 +190,10 @@ class AppExportApi(Resource):
@get_app_model
def get(self, app_model):
"""Export app"""
+ # The role of the current user in the ta table must be admin, owner, or editor
+ if not current_user.is_editor:
+ raise Forbidden()
+
app_service = AppService()
return {