refactor admin check in required role