Leaving an old job for a better paycheck? Maybe not, if the old boss can help it.

A lawsuit targeting fast-food sandwich chain Jimmy John's has put scrutiny on agreements banning low- and middle-wage workers from competing against their former employers.

Non-competition agreements are better known among high-paid professionals, salespeople and senior executives. In some cases, companies may fear a senior executive who quits one job may walk out the door with trade secrets or client lists and give them to a new employer.

But maids, nail stylists, agriculture workers, sandwich makers and cable TV installers have also been required to sign such deals.

It's not clear how many low- or middle-wage workers are required to sign non-compete agreements. Legal filings make clear the practice extends beyond the executive suite.