<commit_before>'use strict';

app.config(['$stateProvider', function ($stateProvider) {
  $stateProvider.state('resource-types', {
    url: "/resource/types",
    templateUrl: '/js/templates/resources/types/index.html',
    controller: 'ResourceTypesCtrl',
    resolve: {
      types: ['Restangular', function (Restangular) {
        return Restangular.all('resources/types').getList();
      }]
    }
  })
    .state('resource-types.resolve', {
      url: "/resolve",
      template: "<div ui-view></div>",
      controller: 'ResourceTypesResolveCtrl',
      resolve: {
        fieldtypes: ['Restangular', function (Restangular) {
          return Restangular.all('resources/fieldtypes').getList();
        }]
      }
    })
    .state('resource-types.resolve.add', {
      url: "/add",
      controller: 'ModalCtrl',
      resolve: {
        options: function () {
          return {
            templateUrl: "/js/templates/resources/types/form.html",
            controller: 'ResourceTypesAddCtrl',
            onComplete: 'resource-types'
          };
        }
      }
    });
}]);<commit_msg>Adding auth requirement for resource/types<commit_after>'use strict';

app.config(['$stateProvider', function ($stateProvider) {
  $stateProvider.state('resource-types', {
    url: "/resource/types",
    templateUrl: '/js/templates/resources/types/index.html',
    controller: 'ResourceTypesCtrl',
    authenticate: true,
    resolve: {
      types: ['Restangular', function (Restangular) {
        return Restangular.all('resources/types').getList();
      }]
    }
  })
    .state('resource-types.resolve', {
      url: "/resolve",
      template: "<div ui-view></div>",
      controller: 'ResourceTypesResolveCtrl',
      authenticate: true,
      resolve: {
        fieldtypes: ['Restangular', function (Restangular) {
          return Restangular.all('resources/fieldtypes').getList();
        }]
      }
    })
    .state('resource-types.resolve.add', {
      url: "/add",
      controller: 'ModalCtrl',
      authenticate: true,
      resolve: {
        options: function () {
          return {
            templateUrl: "/js/templates/resources/types/form.html",
            controller: 'ResourceTypesAddCtrl',
            onComplete: 'resource-types'
          };
        }
      }
    });
}]);
{'fraction_non_alphanumeric': 0.15601912212081703, 'fraction_numerical': 0.0, 'mean_word_length': 2.4564564564564564, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5826057', 'n_tokens_mistral': 642, 'n_tokens_neox': 635, 'n_words': 108}