-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pivotal ID #185392780: User FTP files API support #724
Pivotal ID #185392780: User FTP files API support #724
Conversation
private fun asUser(registerRequest: RegisterRequest) = DbUser( | ||
email = registerRequest.email, | ||
fullName = registerRequest.name, | ||
orcid = registerRequest.orcid, | ||
secret = securityUtil.newKey(), | ||
notificationsEnabled = registerRequest.notificationsEnabled, | ||
magicFolderType = MagicFolderType.NFS, |
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.
Would be great to have the default value configurable in application properties
…API-use-FTP' of github.com:EBIBioStudies/biostudies-backend-services into feature/pivotal-185392780-User-FTP-files-API-support
…services into feature/pivotal-185392780-User-FTP-files-API-support
@jhoanmanuelms after this one we will need to
|
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.
LGTM. Please consider my comments
@@ -76,6 +79,10 @@ class DbUser( | |||
@Column | |||
var notificationsEnabled: Boolean = false, | |||
|
|||
@Enumerated(EnumType.STRING) | |||
@Column(name = "magic_folder_type") | |||
var magicFolderType: MagicFolderType, |
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 understand the "Magic Folder" denomination was something we inherited from the previous version of BioStudies. However, I think we should rename it to something more accurate like for example storageType
or even storageMode
.
} | ||
|
||
data class FtpMagicFolder(override val relativePath: Path) : MagicFolder |
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.
The same comment could apply here. Perhaps we could use this opportunity to get rid of the "Magic" and call it by its name UserFolder
which is more appropriate.
Don't get me wrong, I love magic as much as the next person, it's just that I feel in this case it's really out of context.
@@ -169,6 +182,7 @@ open class SecurityService( | |||
orcid = registerRequest.orcid, | |||
secret = securityUtil.newKey(), | |||
notificationsEnabled = registerRequest.notificationsEnabled, | |||
magicFolderType = securityProps.filesProperties.defaultMode, |
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.
Shouldn't this be:
magicFolderType = registerRequest.magicFolderType ?: securityProps.filesProperties.defaultMode
?
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.
to come in following PR
@@ -41,6 +42,7 @@ class SecurityQueryService( | |||
email = email, | |||
fullName = username, | |||
secret = securityUtil.newKey(), | |||
magicFolderType = MagicFolderType.NFS, |
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.
Will this always be the default or should we consider the default mode defined in the properties? Or even should we maybe even allow the endpoint consumers to choose the type on a per request basis?
requireActivation: false | ||
filesProperties: | ||
filesDirPath: |
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 think we could use this opportunity to add documentation for the properties
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.
they have, but not in the itest file but in application yml files of reulgar application
…services into feature/pivotal-185392780-User-FTP-files-API-support
https://www.pivotaltracker.com/story/show/185392780