<commit_before>angular.module('os.administrative.models.site', ['os.common.models'])
  .factory('Site', function(osModel, $rootScope) {
    var Site = new osModel('sites');

    Site.prototype.getType = function() {
      return 'site';
    }

    Site.prototype.getDisplayName = function() {
      return this.name;
    }

    Site.listForCps = function(opName) {
      var opts = {resource: 'CollectionProtocol', operation: opName};
      return getSites(opts);
    }

    Site.listForPmis = function(opName) {
      var opts = {resource: 'ParticipantPhi', operation: opName};
      return getSites(opts);
    }

    Site.listForContainers = function(opName) {
      var opts = {resource: 'ParticipantPhi', operation: opName};
      return getSites(opts);
    }

    Site.listForRoles = function(instituteName) {
       var opts = {institute: instituteName}
       if (!$rootScope.currentUser.admin) {
         opts = {resource: 'User', operation: 'Update'};
       }
       return getSites(opts);
    }
<commit_msg>Fixed - method to get sites for storage containers resource should be 'StorageContainer'<commit_after>angular.module('os.administrative.models.site', ['os.common.models'])
  .factory('Site', function(osModel, $rootScope) {
    var Site = new osModel('sites');

    Site.prototype.getType = function() {
      return 'site';
    }

    Site.prototype.getDisplayName = function() {
      return this.name;
    }

    Site.listForCps = function(opName) {
      var opts = {resource: 'CollectionProtocol', operation: opName};
      return getSites(opts);
    }

    Site.listForPmis = function(opName) {
      var opts = {resource: 'ParticipantPhi', operation: opName};
      return getSites(opts);
    }

    Site.listForContainers = function(opName) {
      var opts = {resource: 'StorageContainer', operation: opName};
      return getSites(opts);
    }

    Site.listForRoles = function(instituteName) {
       var opts = {institute: instituteName}
       if (!$rootScope.currentUser.admin) {
         opts = {resource: 'User', operation: 'Update'};
       }
       return getSites(opts);
    }

{'fraction_non_alphanumeric': 0.1329862754377662, 'fraction_numerical': 0.0, 'mean_word_length': 3.081081081081081, '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': '4660752', 'n_tokens_mistral': 648, 'n_tokens_neox': 630, 'n_words': 135}