source: trunk/grails-app/controllers/nl/tno/metagenomics/StudyController.groovy @ 2

Last change on this file since 2 was 2, checked in by robert@…, 8 years ago

Initial import of basic functionality

File size: 583 bytes
Line 
1package nl.tno.metagenomics
2
3class StudyController {
4        def synchronizationService
5        def gscfService
6        def fileService
7       
8        def index = {
9                // Synchronize all studies
10                synchronizationService.sessionToken = session.sessionToken
11                synchronizationService.user = session.user
12
13                synchronizationService.synchronizeStudies()
14               
15                // Clean the upload directory
16                fileService.cleanDirectory();
17               
18                // Filter studies for the ones the user is allowed to see
19                def studies = Study.findAll();
20                [studies: studies.findAll { it.canRead( session.user ) }, gscfAddUrl: gscfService.urlAddStudy() ] 
21        }
22}
Note: See TracBrowser for help on using the repository browser.