<commit_before>
import Tyr from '../tyr';

import Component  from '../core/component';
import Collection from '../core/collection';
import Query      from '../core/query';


const Secure = {


};

Tyr.mixin(Secure, Component);

Tyr.Secure = Secure;

Collection.prototype.secureQuery = async function(query) {
  const secure = Tyr.secure;

  query = query || {};

  if (secure) {
    query = Query.merge(query, await secure.query(this));
  }

  return query;
};

export default Secure;<commit_msg>pass perm-type through to secure.query()<commit_after>
import Tyr from '../tyr';

import Component  from '../core/component';
import Collection from '../core/collection';
import Query      from '../core/query';


const Secure = {


};

Tyr.mixin(Secure, Component);

Tyr.Secure = Secure;

Collection.prototype.secureQuery = async function(query, permissionType) {
  const secure = Tyr.secure;

  query = query || {};

  if (secure) {
    query = Query.merge(query, await secure.query(this, permissionType));
  }

  return query;
};

export default Secure;
{'fraction_non_alphanumeric': 0.14652711703139867, 'fraction_numerical': 0.0, 'mean_word_length': 3.6343612334801763, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3997303', 'n_tokens_mistral': 334, 'n_tokens_neox': 312, 'n_words': 89}