correct wrong line with permit in model and move it to controller