unneeded function in ensureAdmin

The ensureAdmin inner function is not needed.