Moved role constraints into model and removed edit deployment

(cherry picked from commit 0c038e58785c0517908855b8725db8fcffe38abb)