Define $request parameter object in Docblocks.
Get post_type object when checking object capabilities.
Check edit permission when passing the edit context.
Use check_edit_permission method to confirm user is allowed to update post.