Changeset 291 for trunk/grails-app/controllers
- Timestamp:
- Jan 23, 2010, 10:42:41 AM (15 years ago)
- Location:
- trunk/grails-app/controllers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AppCoreController.groovy
r258 r291 6 6 class AppCoreController extends BaseController { 7 7 8 def personService8 def authService 9 9 def appConfigService 10 10 def createDataService … … 22 22 */ 23 23 def welcome = { 24 def personInstance = personService.currentUser24 def personInstance = authService.currentUser 25 25 flash.message = "Welcome, ${personInstance.firstName} ${personInstance.lastName}." 26 26 … … 41 41 def changeSessionTimeout = { 42 42 if (request.method == 'GET') { 43 def personInstance = personService.currentUser43 def personInstance = authService.currentUser 44 44 return [ personInstance : personInstance ] 45 45 } 46 46 if (request.method == 'POST') { 47 def personInstance = personService.currentUser47 def personInstance = authService.currentUser 48 48 personInstance.properties = params 49 49 if (!personInstance.hasErrors() && personInstance.save(flush: true)) { … … 67 67 68 68 if (request.method == 'GET') { 69 def personInstance = personService.currentUser69 def personInstance = authService.currentUser 70 70 return [ personInstance : personInstance ] 71 71 } 72 72 73 73 if (request.method == 'POST') { 74 def personInstance = personService.currentUser74 def personInstance = authService.currentUser 75 75 76 76 if(params.confirmPass == params.pass) { -
trunk/grails-app/controllers/EntryDetailedController.groovy
r216 r291 3 3 class EntryDetailedController extends BaseController { 4 4 5 def personService5 def authService 6 6 def taskService 7 7 … … 29 29 def entryInstance = Entry.get( params.id ) 30 30 if(entryInstance) { 31 if(entryInstance.enteredBy.loginName == personService.currentUser.loginName) {31 if(entryInstance.enteredBy.loginName == authService.currentUser.loginName) { 32 32 def taskID = entryInstance.task.id 33 33 entryInstance.delete(flush:true) … … 55 55 else { 56 56 57 if(entryInstance.enteredBy.loginName == personService.currentUser.loginName) {57 if(entryInstance.enteredBy.loginName == authService.currentUser.loginName) { 58 58 return [ entryInstance : entryInstance ] 59 59 } … … 70 70 if(entryInstance) { 71 71 // The update method only accepts post requests, so this is just in case. 72 if(entryInstance.enteredBy.loginName == personService.currentUser.loginName) {72 if(entryInstance.enteredBy.loginName == authService.currentUser.loginName) { 73 73 entryInstance.properties = params 74 74 if(!entryInstance.hasErrors() && entryInstance.save(flush: true)) { -
trunk/grails-app/controllers/TaskDetailedController.groovy
r262 r291 5 5 class TaskDetailedController extends BaseController { 6 6 7 def personService7 def authService 8 8 def taskService 9 9 def taskSearchService … … 45 45 def taskInstanceTotal 46 46 def filterParams = [:] 47 def personInstance = personService.currentUser47 def personInstance = authService.currentUser 48 48 49 49 // Quick Search: … … 125 125 if(!FilterUtils.isFilterApplied(params)) { 126 126 def taskInstanceList = [] 127 def personInstance = personService.currentUser127 def personInstance = authService.currentUser 128 128 129 129 if(params.quickSearch == "searchMyTodays") { … … 170 170 if(!FilterUtils.isFilterApplied(params)) { 171 171 def taskInstanceList = [] 172 def personInstance = personService.currentUser172 def personInstance = authService.currentUser 173 173 174 174 if(params.quickSearch == "budgetUnplanned") { … … 501 501 502 502 // Default leadPerson to current user, unless supplied in params. 503 taskInstance.leadPerson = personService.currentUser503 taskInstance.leadPerson = authService.currentUser 504 504 taskInstance.properties = params 505 505 return ['taskInstance': taskInstance]
Note: See TracChangeset
for help on using the changeset viewer.