This cleans up canDelete, canEdit and canEditState functions so they always return a boolean and are consistent in how they operate (they can return null in many cases instead of the documented boolean). There are no actual changes to functionality here so theoretically this is code review.
But feel free to test that the authorisation checks on ability to edit, publish/unpublish and delete are unaffected
It seems to me that the if (!empty($record->id)... is the wrong way around in almost every file of this PR. The first one looks correct with if (empty($record->id).
Try to delete a client from the banners component or any other item in an affected component. It fails with this PR.
@wilsonge please can you look at resolving the conflicts here