<commit_before>var router = require('express').Router(),
	passport = require("passport");

var restricted = function (req, res, next) {
	// Unauthenticated users get redirected to the login page
	if (!req.isAuthenticated())
		return res.redirect('/login');

	// Only administrators are allowed to access the users page
	if (req.route.path === '/users') {
		if (req.user.Role === 'Administrator') {
			return next();
		} else {
			return res.redirect("/overview");
		}
	}

	// Otherwise you are fine
	next();
};

router.get('/', function (req, res) {
	res.render('index');
});

router.get('/login', function (req, res) {
	res.render('login');
});

router.post('/login', passport.authenticate('local', {
	successRedirect: '/overview',
	failureRedirect: '/login'
}));

router.get('/tracking', restricted, function (req, res) {
	res.render('general/index');
});

router.get('/applications', restricted, function (req, res) {
	res.render('general/index');
});

router.get('/clients', restricted, function (req, res) {
	res.render('general/index');
});

router.get('/users', restricted, function (req, res) {
	res.render('general/index');
});

router.get('/overview', restricted, function (req, res) {
	res.render('general/index');
});

module.exports = router;<commit_msg>Adding the /tracking/report path<commit_after>var router = require('express').Router(),
	passport = require("passport");

var restricted = function (req, res, next) {
	// Unauthenticated users get redirected to the login page
	if (!req.isAuthenticated())
		return res.redirect('/login');

	// Only administrators are allowed to access the users page
	if (req.route.path === '/users') {
		if (req.user.Role === 'Administrator') {
			return next();
		} else {
			return res.redirect("/overview");
		}
	}

	// Otherwise you are fine
	next();
};

router.get('/', function (req, res) {
	res.render('index');
});

router.get('/login', function (req, res) {
	res.render('login');
});

router.post('/login', passport.authenticate('local', {
	successRedirect: '/overview',
	failureRedirect: '/login'
}));

router.get('/tracking', restricted, function (req, res) {
	res.render('general/index');
});

router.post('/tracking/report', restricted, function (req, res) {
	res.render('general/index');
});

router.get('/applications', restricted, function (req, res) {
	res.render('general/index');
});

router.get('/clients', restricted, function (req, res) {
	res.render('general/index');
});

router.get('/users', restricted, function (req, res) {
	res.render('general/index');
});

router.get('/overview', restricted, function (req, res) {
	res.render('general/index');
});

module.exports = router;
{'fraction_non_alphanumeric': 0.2004521477015825, 'fraction_numerical': 0.0, 'mean_word_length': 4.759219088937093, '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': '1948921', 'n_tokens_mistral': 865, 'n_tokens_neox': 822, 'n_words': 200}