issue #24104: refactor priv check to model