Browse Source

feat: add export permission (#5841)

Joe 9 months ago
parent
commit
59ad091e69
1 changed files with 4 additions and 0 deletions
  1. 4 0
      api/controllers/console/app/app.py

+ 4 - 0
api/controllers/console/app/app.py

@@ -190,6 +190,10 @@ class AppExportApi(Resource):
     @get_app_model
     @get_app_model
     def get(self, app_model):
     def get(self, app_model):
         """Export app"""
         """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()
         app_service = AppService()
 
 
         return {
         return {