Under what circumstances is it acceptable for an employee to refrain from competing with their employer after the contract has ended? 
If the employee's work involves accessing work secrets or interacting with the employer's customers, both parties can agree that the employee will not engage in any competition with the employer or take up employment that competes with them after the contract termination.