Changeset 1487 for trunk/src/groovy/dbnp
- Timestamp:
- Feb 3, 2011, 10:51:16 AM (10 years ago)
- Location:
- trunk/src/groovy/dbnp/query
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/groovy/dbnp/query/Search.groovy
r1483 r1487 49 49 public void setResultFields( Map r ) { resultFields = r; } 50 50 51 public Search() { 52 def ctx = ApplicationHolder.getApplication().getMainContext(); 53 def authenticationService = ctx.getBean("authenticationService"); 54 def sessionUser = authenticationService?.getLoggedInUser(); 55 56 if( sessionUser ) 57 this.user = sessionUser; 58 else 59 this.user = null 60 } 61 51 62 /** 52 63 * Returns the number of results found by this search … … 215 226 return []; 216 227 217 // Determine the moduleCommunicationService 218 def ctx = (ApplicationContext)ApplicationHolder.getApplication().getMainContext(); 228 // Determine the moduleCommunicationService. Because this object 229 // is mocked in the tests, it can't be converted to a ApplicationContext object 230 def ctx = ApplicationHolder.getApplication().getMainContext(); 219 231 def moduleCommunicationService = ctx.getBean("moduleCommunicationService"); 220 232 -
trunk/src/groovy/dbnp/query/StudySearch.groovy
r1482 r1487 67 67 68 68 def studies = Study.list().findAll { it.canRead( this.user ) }; 69 69 70 70 // If no criteria are found, return all studies 71 71 if( !criteria || criteria.size() == 0 ) {
Note: See TracChangeset
for help on using the changeset viewer.