refactored roles checks
regen app doc