Skip to content

Commit 46400d0

Browse files
committed
fix: add require_permissions in data training for upload Excel file
1 parent 07b7623 commit 46400d0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

backend/apps/data_training/api/data_training.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def inner():
160160

161161
@router.post("/uploadExcel", summary=f"{PLACEHOLDER_PREFIX}upload_excel_dt")
162162
@system_log(LogConfig(operation_type=OperationType.IMPORT, module=OperationModules.DATA_TRAINING))
163+
@require_permissions(permission=SqlbotPermission(role=['ws_admin']))
163164
async def upload_excel(trans: Trans, current_user: CurrentUser, file: UploadFile = File(...)):
164165
ALLOWED_EXTENSIONS = {"xlsx", "xls"}
165166
if not file.filename.lower().endswith(tuple(ALLOWED_EXTENSIONS)):

0 commit comments

Comments
 (0)