Changeset 832 for trunk/grails-app
- Timestamp:
- Mar 3, 2011, 11:17:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/TaskService.groovy
r816 r832 341 341 return fail(field:"task", code:"task.notFound") 342 342 343 if(taskInstance.taskStatus.id == 3) 344 return fail(field:"task", code:"task.operationNotPermittedOnCompleteTask") 345 346 // Check for authorisation on recurring tasks. 347 if(taskInstance.taskRecurringSchedule) { 348 if(!authenticateService.ifAnyGranted('ROLE_AppAdmin,ROLE_Manager,ROLE_TaskManager')) 349 return fail(field:"task", code:"task.operationNotPermittedOnRecurringTaskWithoutAuth") 350 } 351 343 352 if(result.entryInstance.hasErrors() || !result.entryInstance.save()) 344 353 return fail(code:"default.create.failure") 345 346 if(taskInstance.taskStatus.id == 3)347 return fail(field:"task", code:"task.operationNotPermittedOnCompleteTask")348 349 // Check for authorisation on recurring tasks.350 if(taskInstance.taskRecurringSchedule) {351 if(!authenticateService.ifAnyGranted('ROLE_AppAdmin,ROLE_Manager,ROLE_TaskManager'))352 return fail(field:"task", code:"task.operationNotPermittedOnRecurringTaskWithoutAuth")353 }354 354 355 355 // If task status is "Not Started" and entry type is "Work Done" and time has been booked.
Note: See TracChangeset
for help on using the changeset viewer.