restructure controller according to user privlidges