Add permission checking to pb_object