-
Notifications
You must be signed in to change notification settings - Fork 4
[PB-5673] set name = plainName #898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| bucketId: string, | ||
| ): Promise<[Folder, Folder, Folder]> { | ||
| const rootFolderName = this.cryptoService.encryptName(`${v4()}`); | ||
| const rootFolderName = v4(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know the side effects of this case. A root folder's name should not be decrypted in any case, as there is no level above it and thus, it does not have any folders at its same level too.
LGTM assuming that, but double check it @jzunigax2
src/modules/folder/folder.usecase.ts
Outdated
|
|
||
| const folderWithSameNameExists = await this.folderRepository.findOne({ | ||
| name: cryptoFileName, | ||
| name: newFolderMetadata.plainName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could not be done, it's not consistent. The already existent items have their names encrypted. The new ones won't. You may introduce an OR here. Or even better: switch from findOne using the name to use the plainName, as we should deprecate this field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to plainName for findOne: f713435
sg-gs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments @TamaraFinogina
|



This PR sets the name equal to plainName instead of its encrypted version.