Review refactor resource permission checker