Moved role constraints into model and removed edit deployment

(cherry picked from commit 0e825e49527a27fba101a55401cbe95220b5cbf3)