fix checking if user is admin with new SQL schema