Explorar o código

feat: add export permission (#5841)

Joe hai 9 meses
pai
achega
59ad091e69
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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 {