Moved role constraints into model and removed edit deployment

(cherry picked from commit 5b7e179f4cfa8dae85ff02066f8867c5f09d8229)