Moved role constraints into model and removed edit deployment

(cherry picked from commit bdf3e3bed88227fe74fb1f046e572a0a1c3487a6)