Changeset 182 for trunk/grails-app/services
- Timestamp:
- Nov 10, 2009, 1:26:53 PM (15 years ago)
- Location:
- trunk/grails-app/services
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/CreateDataService.groovy
r181 r182 9 9 boolean transactional = false 10 10 11 def authenticateService11 def personService 12 12 def taskService 13 13 … … 151 151 //Person 152 152 def passClearText = "pass" 153 def passwordEncoded = authenticateService.encodePassword(passClearText)153 def passwordEncoded = personService.encodePassword(passClearText) 154 154 def personInstance 155 155 … … 168 168 //Person 169 169 def passClearText = "pass" 170 def passwordEncoded = authenticateService.encodePassword(passClearText)170 def passwordEncoded = personService.encodePassword(passClearText) 171 171 def personInstance 172 172 … … 200 200 //Person 201 201 def passClearText = "pass" 202 def passwordEncoded = authenticateService.encodePassword(passClearText)202 def passwordEncoded = personService.encodePassword(passClearText) 203 203 def personInstance 204 204 -
trunk/grails-app/services/TaskService.groovy
r181 r182 4 4 5 5 def dateUtilService 6 def authenticateService6 def personService 7 7 8 8 def create(params) { … … 14 14 result.taskInstance = taskInstance 15 15 16 // Get person in a safe way to avoid a null userDomain during bootstrap.17 def userDomain = authenticateService.userDomain()18 def person = userDomain ? Person.get(userDomain.id) : Person.get(1)19 20 16 if(taskInstance.save()) { 21 def taskModification = new TaskModification(person: person,17 def taskModification = new TaskModification(person: personService.currentUser(), 22 18 taskModificationType: TaskModificationType.get(1), 23 19 task: taskInstance) … … 64 60 65 61 if(result.taskInstance.save()) { 66 def taskModification = new TaskModification(person: Person.get(authenticateService.userDomain().id),62 def taskModification = new TaskModification(person:personService.currentUser(), 67 63 taskModificationType: TaskModificationType.get(3), 68 64 task: result.taskInstance) … … 107 103 108 104 if(result.taskInstance.save()) { 109 def taskModification = new TaskModification(person: Person.get(authenticateService.userDomain().id),105 def taskModification = new TaskModification(person:personService.currentUser(), 110 106 taskModificationType: TaskModificationType.get(4), 111 107 task: result.taskInstance) … … 150 146 151 147 if(result.taskInstance.save()) { 152 def taskModification = new TaskModification(person: Person.get(authenticateService.userDomain().id),148 def taskModification = new TaskModification(person:personService.currentUser(), 153 149 taskModificationType: TaskModificationType.get(5), 154 150 task: result.taskInstance) … … 193 189 194 190 if(result.taskInstance.save()) { 195 def taskModification = new TaskModification(person: Person.get(authenticateService.userDomain().id),191 def taskModification = new TaskModification(person:personService.currentUser(), 196 192 taskModificationType: TaskModificationType.get(6), 197 193 task: result.taskInstance) … … 236 232 237 233 if(result.taskInstance.save()) { 238 def taskModification = new TaskModification(person: Person.get(authenticateService.userDomain().id),234 def taskModification = new TaskModification(person:personService.currentUser(), 239 235 taskModificationType: TaskModificationType.get(7), 240 236 task: result.taskInstance) … … 279 275 280 276 if(result.taskInstance.save()) { 281 def taskModification = new TaskModification(person: Person.get(authenticateService.userDomain().id),277 def taskModification = new TaskModification(person:personService.currentUser(), 282 278 taskModificationType: TaskModificationType.get(8), 283 279 task: result.taskInstance) … … 322 318 323 319 if(result.taskInstance.save()) { 324 def taskModification = new TaskModification(person: Person.get(authenticateService.userDomain().id),320 def taskModification = new TaskModification(person:personService.currentUser(), 325 321 taskModificationType: TaskModificationType.get(9), 326 322 task: result.taskInstance)
Note: See TracChangeset
for help on using the changeset viewer.