Changeset 1099 for trunk/grails-app/controllers
- Timestamp:
- Nov 8, 2010, 12:26:35 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r1098 r1099 123 123 if (flow.jump && flow.jump.action == 'edit' && flow.jump.id) { 124 124 // load study 125 if (this.loadStudy(flow, flash, [studyid:flow.jump.id] )) {125 if (this.loadStudy(flow, flash, [studyid:flow.jump.id],authenticationService.getLoggedInUser())) { 126 126 toStudyPage() 127 127 } else { … … 180 180 on("next") { 181 181 // load study 182 if (this.loadStudy(flow, flash, params )) {182 if (this.loadStudy(flow, flash, params, authenticationService.getLoggedInUser())) { 183 183 success() 184 184 } else { … … 854 854 * @returns boolean 855 855 */ 856 def loadStudy(flow, flash, params ) {856 def loadStudy(flow, flash, params, user) { 857 857 // def authenticationService 858 if( authenticationService == null ) 859 authenticationService = new AuthenticationService() 860 858 861 859 flash.errors = new LinkedHashMap() 862 860 … … 869 867 // the used should had never seen a link to this page, so he should never get 870 868 // here. That's why we just return false 871 if (!study.canWrite(authenticationService.getLoggedInUser())) { 872 return false 869 // if (!study.canWrite(authenticationService.getLoggedInUser())) { 870 if (!study.canWrite(user)){ 871 return false 873 872 } 874 873
Note: See TracChangeset
for help on using the changeset viewer.