protected function modelAbilityConstraint(Model $model, $strict)
    {
        return function ($query) use ($model, $strict) {
            $query->where("{$this->table}.entity_type", $model->getMorphClass());

            $query->where($this->abilitySubqueryConstraint($model, $strict));
        };
    }