<commit_before>'use strict';
// =========================================================================
//
// Policies for documents
//
// =========================================================================
var acl  = require ('acl');
acl      = new acl (new acl.memoryBackend ());
var helpers  = require (require('path').resolve('./modules/core/server/controllers/core.helpers.controller'));

exports.invokeRolesPolicies = function () {
	helpers.setCRUDPermissions (acl, 'document');

	helpers.setPathPermissions (acl, [
        [ 'guest', 'user', '/api/documentlist'    ],
        [ 'guest', 'user', '/api/documents/:projectid'    ],
        [ 'guest', 'user', '/api/documents/versions/:documentid'    ],
        [ 'guest', 'user', '/api/documents/folderNames/:projectid'    ],
        [ '', 'user', '/api/documents/approveAndDownload/:document'    ],
        [ 'guest', 'user', '/api/documents/types/:projectid'    ],
        [ 'guest', 'user', '/api/documents/memtypes/:projectid'    ]
	]);

};

exports.isAllowed = helpers.isAllowed (acl);<commit_msg>Add guests to hit fetch route.  Ugly.<commit_after>'use strict';
// =========================================================================
//
// Policies for documents
//
// =========================================================================
var acl  = require ('acl');
acl      = new acl (new acl.memoryBackend ());
var helpers  = require (require('path').resolve('./modules/core/server/controllers/core.helpers.controller'));

exports.invokeRolesPolicies = function () {
	helpers.setCRUDPermissions (acl, 'document');

	helpers.setPathPermissions (acl, [
        [ 'guest', 'user', '/api/documentlist'    ],
        [ 'guest', 'user', '/api/documents/:projectid'    ],
        [ 'guest', 'user', '/api/documents/versions/:documentid'    ],
        [ 'guest', 'user', '/api/documents/folderNames/:projectid'    ],
        [ '', 'user', '/api/documents/approveAndDownload/:document'    ],
        [ 'guest', 'user', '/api/documents/types/:projectid'    ],
        [ 'guest', 'user', '/api/documents/memtypes/:projectid'    ],
        [ 'guest', 'user', '/api/document/:document/fetch'    ]
	]);

};

exports.isAllowed = helpers.isAllowed (acl);
{'fraction_non_alphanumeric': 0.30581867388362655, 'fraction_numerical': 0.0, 'mean_word_length': 3.6991525423728815, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5623574', 'n_tokens_mistral': 645, 'n_tokens_neox': 645, 'n_words': 104}