We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07b7623 commit 46400d0Copy full SHA for 46400d0
1 file changed
backend/apps/data_training/api/data_training.py
@@ -160,6 +160,7 @@ def inner():
160
161
@router.post("/uploadExcel", summary=f"{PLACEHOLDER_PREFIX}upload_excel_dt")
162
@system_log(LogConfig(operation_type=OperationType.IMPORT, module=OperationModules.DATA_TRAINING))
163
+@require_permissions(permission=SqlbotPermission(role=['ws_admin']))
164
async def upload_excel(trans: Trans, current_user: CurrentUser, file: UploadFile = File(...)):
165
ALLOWED_EXTENSIONS = {"xlsx", "xls"}
166
if not file.filename.lower().endswith(tuple(ALLOWED_EXTENSIONS)):
0 commit comments