Moved role constraints into model and removed edit deployment

(cherry picked from commit b8f53af3934bd0df7ae3a1a73687732a2af66f68)