- Timestamp:
- Nov 30, 2010, 2:10:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/exporter/ExporterController.groovy
r1220 r1222 45 45 def c = dbnp.studycapturing.Study.createCriteria() 46 46 47 def studies 48 if( user == null ) { 49 studies = c.list { 50 maxResults(max) 51 and { 52 eq( "published", true ) 53 eq( "publicstudy", true ) 54 } 55 } 56 } else { 57 studies = c.list { 58 maxResults(max) 59 or { 60 eq( "owner", user ) 61 writers { 62 eq( "id", user.id ) 63 } 64 and { 65 readers { 66 eq( "id", user.id ) 67 } 68 eq( "published", true ) 69 } 70 } 71 } 72 } 47 def studies = Study.giveReadableStudies(user, max); 73 48 [studyInstanceList: studies, studyInstanceTotal: studies.count()] 74 49 }
Note: See TracChangeset
for help on using the changeset viewer.