Moved role constraints into model and removed edit deployment

(cherry picked from commit 89abbe5183cd1635fd35005473dae69548f3657b)