<commit_before>import * as express from "express";
import * as crypto from "crypto";
import {user, UserDocument} from "../models/userModel";
import {authenticator} from "../lib/authenticationChecker";
import {
    checkInsideCompany,
    checkOwner,
    checkOwnerWithIDSkip,
    checkSuperAdmin
} from "../lib/standardMiddlewareChecks";
import {mailSender, MailOptions} from "../lib/mailSender";
/**
 * This class contains endpoint definition about users.
 *
 * @history
 * | Author      | Action Performed         | Data |
 * | ---         | ---                      | ---  |
 * | <NAME> | Create class UserRouter  | 10/05/2016 |
 *
 * @author <NAME>
 * @license MIT
 *
 */
class UserRouter {

    /**
     * @description Express router.
     */
    private router : express.Router;

    /**
     * @description Complete constructor. Here we initialize user's routes.
     */
    constructor() {
        this.router = express.Router();

        this.router.post("/login", UserRouter.login);

        this.router.get(
            "/companies/:company_id/users",
            authenticator.authenticate,
            checkInsideCompany,
            this.getAllUsersForCompany);

        this.router.get(
            "/companies/:company_id/users/:user_id",
            authenticator.authenticate,
            checkInsideCompany,
            this.getOneUser);

        this.router.post(
            "/companies/:company_id/users",
            authenticator.authenticate,
            checkOwner,
            checkInsideCompany,
            this.createUser);

        /*
         *   By the checkOwnerWithIDSkip the users allowed to 
         *   modify the credentials are only the owner of the company
         *   and the owner of the profile
         */
        this.router.put(
            "/companies/:company_id/users/:user_id/credentials",
            authenticator.authenticate,
            checkOwnerWithIDSkip,
            checkInsideCompany,
            this.changeCredentials);

        this.router.put(
            "/companies/:company_id/users/:user_id",
            authenticator.authenticate,
            checkOwner,
            checkInsideCompany,
            this.updateUser);
<commit_msg>Changes to test in heroku<commit_after>import * as express from "express";
import * as crypto from "crypto";
import {user, UserDocument} from "../models/userModel";
import {authenticator} from "../lib/authenticationChecker";
import {
    checkInsideCompany,
    checkOwner,
    checkOwnerWithIDSkip,
    checkSuperAdmin
} from "../lib/standardMiddlewareChecks";
import {mailSender, MailOptions} from "../lib/mailSender";
/**
 * This class contains endpoint definition about users.
 *
 * @history
 * | Author      | Action Performed         | Data |
 * | ---         | ---                      | ---  |
 * | <NAME> | Create class UserRouter  | 10/05/2016 |
 *
 * @author <NAME>
 * @license MIT
 *
 */
class UserRouter {

    /**
     * @description Express router.
     */
    private router : express.Router;

    /**
     * @description Complete constructor. Here we initialize user's routes.
     */
    constructor() {
        this.router = express.Router();

        this.router.post("/login", UserRouter.login);

        this.router.get(
            "/companies/:company_id/users",
            authenticator.authenticate,
            checkInsideCompany,
            this.getAllUsersForCompany);

        this.router.get(
            "/companies/:company_id/users/:user_id",
            authenticator.authenticate,
            checkInsideCompany,
            this.getOneUser);

        this.router.post(
            "/companies/:company_id/users",
            //authenticator.authenticate,
            //checkOwner,
            //checkInsideCompany,
            this.createUser);

        /*
         *   By the checkOwnerWithIDSkip the users allowed to 
         *   modify the credentials are only the owner of the company
         *   and the owner of the profile
         */
        this.router.put(
            "/companies/:company_id/users/:user_id/credentials",
            authenticator.authenticate,
            checkOwnerWithIDSkip,
            checkInsideCompany,
            this.changeCredentials);

        this.router.put(
            "/companies/:company_id/users/:user_id",
            authenticator.authenticate,
            checkOwner,
            checkInsideCompany,
            this.updateUser);

{'fraction_non_alphanumeric': 0.10804701627486438, 'fraction_numerical': 0.003616636528028933, 'mean_word_length': 1.916941331575478, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '323970', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1142, 'n_words': 252}