- Timestamp:
- Jan 23, 2010, 10:42:41 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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)) {
Note: See TracChangeset
for help on using the changeset viewer.