Moved role constraints into model and removed edit deployment

(cherry picked from commit 089945280adff660e126252f74e5574e6431aee0)