factoring out the is user admin on corpus logic so it can be reused in multiple functions