fixed setRole function, the check where made against 'affiliation' values, now we do that against actual role values