This commit is contained in:
m
2026-09-03 20:57:27 +02:00
parent 80dd164fde
commit 8982e96197
4 changed files with 64 additions and 9 deletions
+4
View File
@@ -12,6 +12,10 @@ func (s *Services) MoveDocumentIntoDocument(from *entities.Document, to *entitie
return fmt.Errorf(entities.ERROR_DOCUMENT_NOT_PERCISTED)
}
if to.DocumentType != entities.DIRECTORY {
return fmt.Errorf("The destination document must be a directory")
}
if canEdit, _ := UserCanEditDocument(s.ConnectedUser, from); canEdit == false {
return fmt.Errorf("You can not edit this folder")
}