<commit_before>/**
 * List of plugins which are about to be installed. Read more at:
 * http://hapijs.com/tutorials/plugins
 */
import config from '../../shared/config';

let pluginList = [
  {
    register: require('hapi-auth-bearer-token')
  },
  {
    register: require('hapi-authorization'),
    options: {
        // All the possible roles. Defaults to SUPER_ADMIN, ADMIN, USER, GUEST.
        // Can be set to false if no hierarchy is being used. by setting to
        // false you do not need to know all the potential roles
        roles: ['user', 'admin'],
        
        // An option to turn on or off hierarchy. Defaults to false
        hierarchy: false,

        // The role hierarchy. Roles with a lower index in the array have access
        // to all roles with a higher index in the array. With the default roles,
        // this means that USER has access to all roles restricted to GUEST,
        // ADMIN has access to all roles restricted to USER and GUEST, and
        // SUPER_ADMIN has access to all roles restricted to ADMIN, USER, and GUEST.
        roleHierarchy: []
    }
  }
];

// plugins that should just be enabled if we are not in test environment
if (config.environment !== 'test') {
  pluginList.push({
    register: require('good'),
    options: {
      opsInterval: 1000,
      reporters: [{
        reporter: require('good-console'),
        events: { log: '*', response: '*' }
      }]
    }
  });
}
<commit_msg>added additional documentation for the authorization<commit_after>/**
 * List of plugins which are about to be installed. Read more at:
 * http://hapijs.com/tutorials/plugins
 */
import config from '../../shared/config';

let pluginList = [
  {
    register: require('hapi-auth-bearer-token')
  },
  {
    register: require('hapi-authorization'),
    options: {
        // All the possible roles. Defaults to SUPER_ADMIN, ADMIN, USER, GUEST.
        // Can be set to false if no hierarchy is being used. by setting to
        // false you do not need to know all the potential roles
        // You can also pass a function, which returns the desired values
        roles: ['user', 'admin'],

        // An option to turn on or off hierarchy. Defaults to false
        hierarchy: false,

        // The role hierarchy. Roles with a lower index in the array have access
        // to all roles with a higher index in the array. With the default roles,
        // this means that USER has access to all roles restricted to GUEST,
        // ADMIN has access to all roles restricted to USER and GUEST, and
        // SUPER_ADMIN has access to all roles restricted to ADMIN, USER, and GUEST.
        roleHierarchy: []
    }
  }
];

// plugins that should just be enabled if we are not in test environment
if (config.environment !== 'test') {
  pluginList.push({
    register: require('good'),
    options: {
      opsInterval: 1000,
      reporters: [{
        reporter: require('good-console'),
        events: { log: '*', response: '*' }
      }]
    }
  });
}

{'fraction_non_alphanumeric': 0.10395217535702425, 'fraction_numerical': 0.002656924609764198, 'mean_word_length': 2.3691275167785233, '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': '5183453', 'n_tokens_mistral': 855, 'n_tokens_neox': 844, 'n_words': 352}