🩹 back,front: when moving an item, check for a new available name (#706)
This commit is contained in:
committed by
ericlinagora
parent
e07ddf5197
commit
d0609f7fc7
@@ -557,6 +557,16 @@ export class DocumentsService {
|
||||
throw Error("Move operation not permitted");
|
||||
} else {
|
||||
oldParent = item.parent_id;
|
||||
const newParentId = content.parent_id;
|
||||
const needRenameTo = await getItemName(
|
||||
newParentId,
|
||||
item.id,
|
||||
item.name,
|
||||
item.is_directory,
|
||||
this.repository,
|
||||
context,
|
||||
);
|
||||
if (needRenameTo !== item.name) renamedTo = item.name = needRenameTo;
|
||||
}
|
||||
if (key === "access_info") {
|
||||
// if manage access is disabled, we don't allow changing access level
|
||||
|
||||
Reference in New Issue
Block a user