Remove code duplication in role model.