Moved role constraints into model and removed edit deployment

(cherry picked from commit fabb9f67a2a75748423f423989da9841d422ee26)