mirror of https://github.com/langgenius/dify.git
delete end_user check (#26402)
Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com>
This commit is contained in:
parent
5073ce6e22
commit
3b4e9b64af
|
|
@ -30,7 +30,6 @@ from extensions.ext_database import db
|
|||
from fields.document_fields import document_fields, document_status_fields
|
||||
from libs.login import current_user
|
||||
from models.dataset import Dataset, Document, DocumentSegment
|
||||
from models.model import EndUser
|
||||
from services.dataset_service import DatasetService, DocumentService
|
||||
from services.entities.knowledge_entities.knowledge_entities import KnowledgeConfig
|
||||
from services.file_service import FileService
|
||||
|
|
@ -299,9 +298,6 @@ class DocumentAddByFileApi(DatasetApiResource):
|
|||
if not file.filename:
|
||||
raise FilenameNotExistsError
|
||||
|
||||
if not isinstance(current_user, EndUser):
|
||||
raise ValueError("Invalid user account")
|
||||
|
||||
upload_file = FileService.upload_file(
|
||||
filename=file.filename,
|
||||
content=file.read(),
|
||||
|
|
@ -391,8 +387,6 @@ class DocumentUpdateByFileApi(DatasetApiResource):
|
|||
raise FilenameNotExistsError
|
||||
|
||||
try:
|
||||
if not isinstance(current_user, EndUser):
|
||||
raise ValueError("Invalid user account")
|
||||
upload_file = FileService.upload_file(
|
||||
filename=file.filename,
|
||||
content=file.read(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue