cloudfoundry/vcap — pull request #151 by frodenas (2011-12-12 23:32:51+00:00)
Title: User info returns if is an admin

When using an outside client (like vmc or cloudfoundry-client), the only way to know if a user is an admin user is retrieving the list of all users, as it returns for each user its email, owned apps and whether is an admin or not, but you must be an admin user to do that. If you invoke the user info method, it only returns its email.

There're some use cases where I want to know if the user logged in is an admin or not, and based on that information I allow or deny him to perform some actions without the need to invoke the api and capture the exception (so it means he isn't an admin).

This branch adds admin info when retrieving user info, as the list users method does.