private void doCallbackOperationForTaskData(TaskData data) { if (data.getActualOwner() != null) { boolean userExists = doCallbackUserOperation(data.getActualOwner().getId()); if (!userExists) { // remove it from the task to avoid foreign key constraint exception data.setActualOwner(null); data.setStatus(Status.Ready); } } if (data.getCreatedBy() != null) { boolean userExists = doCallbackUserOperation(data.getCreatedBy().getId()); if (!userExists) { // remove it from the task to avoid foreign key constraint exception data.setCreatedBy(null); } } }
private void doCallbackOperationForTaskData(TaskData data) { if (data.getActualOwner() != null) { boolean userExists = doCallbackUserOperation(data.getActualOwner().getId()); if (!userExists) { // remove it from the task to avoid foreign key constraint exception data.setActualOwner(null); data.setStatus(Status.Ready); } } if (data.getCreatedBy() != null) { boolean userExists = doCallbackUserOperation(data.getCreatedBy().getId()); if (!userExists) { // remove it from the task to avoid foreign key constraint exception data.setCreatedBy(null); } } }
operationAllowed = (task.getTaskData().getCreatedBy() != null && (task.getTaskData().getCreatedBy().equals(user)) || (groupIds != null && groupIds.contains(task.getTaskData().getCreatedBy().getId()))); break;
}).fire(task); boolean adminAllowed = CommandsUtil.isAllowed(user, getGroupsIds(), task.getPeopleAssignments().getBusinessAdministrators()); boolean initiatorAllowed = (task.getTaskData().getCreatedBy() != null && (task.getTaskData().getCreatedBy().equals(user))); boolean potOwnerAllowed = CommandsUtil.isAllowed(user, getGroupsIds(), task.getPeopleAssignments().getPotentialOwners()); boolean ownerAllowed = (task.getTaskData().getActualOwner() != null && task.getTaskData().getActualOwner().equals(user));