Skip to content

688 ftp update#684

Open
christophkohl1 wants to merge 34 commits intog5_masterfrom
688-ftp-update
Open

688 ftp update#684
christophkohl1 wants to merge 34 commits intog5_masterfrom
688-ftp-update

Conversation

@christophkohl1
Copy link
Collaborator

No description provided.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the methods in this controller should be restricted to ROLE_CONTRIBUTOR.

user = User.get(springSecurityService.principal?.id)
}

params['_embed'] = params['_embed'] ?: 'identifiedComponents'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really applicable for this class of objects. Don't think we would have any embeds.

Comment on lines 45 to 52
ftpServer = new FakeFtpServer()
ftpServer.setServerControlPort(MOCKSERVER_PORT)
FileSystem fileSystem = new UnixFakeFileSystem()
fileSystem.add(new FileEntry(NON_KBART_FILE, CONTENTS))
ftpServer.setFileSystem(fileSystem)
ftpServer.addUserAccount(new UserAccount(USER, PASSWORD, HOME_DIR))

ftpServer.start()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be best do do this once for all tests, and then make sure to only do the stop() after the last test.

String principal //legacy
String credentials //legacy
User owner
String ba_username
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be in camel case, which should then be explicitly mapped to a pascal case column name via mapping, for example ep_url with the prefix for endPoint . The prefix ba is too cryptic here and should be replaced by a more descriptive one.

resultList*.remove('ba_password')
resultList*.remove('ba_username')

if (params['method']) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filtering after the fact is not permissible, since it may invalidate the pagination info. Custom logic should be added in componentLookupService.restLookup if necessary.


if (result.data) {
def resultList = result.data
resultList*.remove('ba_password')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mapping configuration for this should be set in the domain class via jsonMapping.ignore.

def resultList = result.data

if(resultList.size() > 0){
resultList*.remove('ba_password')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants