Is there an API that would tell me groups in which the current user is a member of. Or better still, whether the current user is an administrator?

Cheers.