Changeset 802 for trunk/grails-app/services
- Timestamp:
- Feb 10, 2011, 12:17:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/TaskService.groovy
r749 r802 685 685 } 686 686 687 // Check for authorisation on tasks having subTasks. 688 if(result.taskInstance.subTasks) { 689 if(!authenticateService.ifAnyGranted('ROLE_AppAdmin,ROLE_Manager,ROLE_TaskManager')) 690 return fail(field:"subTasks", code:"task.operationNotPermittedOnTaskHavingSubTasksWithoutAuth") 691 } 692 693 // Check for taskProcedure using this task as linkedTask. 694 if(result.taskInstance.taskProcedure?.linkedTask?.id == result.taskInstance.id) 695 return fail(field:"taskProcedure", code:"task.operationNotPermittedOnTaskLinkedToProcedure") 696 697 // Check for Parent PM task type. 698 if(result.taskInstance.taskType.id == 6) 699 return fail(field:"taskProcedure", code:"task.operationNotPermittedOnParentPmTask") 700 687 701 result.taskInstance.trash = true 688 702 result.taskInstance.attentionFlag = false 689 703 result.taskInstance.taskRecurringSchedule?.enabled = false 704 result.taskInstance.subTasks.each { 705 it.parentTask = null 706 } 690 707 691 708 if(result.taskInstance.hasErrors() || !result.taskInstance.save())
Note: See TracChangeset
for help on using the changeset viewer.