<commit_before>module ACL
  module Control
    
    def self.put(variable)<commit_msg>Add code to check access level<commit_after>module ACL
  module Control
    
    def self.check_level(route,method)
      validators_collection = Rules::Collection::ClassMethods.acl_routes_collection[route][method]
      if validators_collection.nil? || validators_collection.empty? then
        return 0
      end
      keys = validators_collection.keys.sort
      highest_level = 0
      keys.reverse_each do |access_level|
        pass = ACL::Validators.run_validators(validators_collection[access_level])
        if (pass==true)
          highest_level = access_level
          break
        end
      end
      return highest_level
    end

    def self.put(variable)
{'fraction_non_alphanumeric': 0.06860158311345646, 'fraction_numerical': 0.002638522427440633, 'mean_word_length': 2.9326424870466323, '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': '1839869', 'n_tokens_mistral': 215, 'n_tokens_neox': 208, 'n_words': 46}