Modernize view roles check
- still needs more work on optimizations