소스 검색

feat: add export permission (#5841)

Joe 9 달 전
부모
커밋
59ad091e69
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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
     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 {