Added function comment for act::calculate() and act::calculateBatch()
Don't get assignments of the resource itself if resource.id is not specified. But still try to get assignments of ancestors.
This will allow calculate permission of the resource's sub type.