Improve reporting on invitation lifecycle
Currently, nearly no information is exposed to admins about what is happening with invitations individually, or even in aggregate. On any workspace with restricted teams it's important to be able to identify how any individual user was added to a restricted team. In the event that a user who should not be there is added, finding out how they were added so process, rules, etc. can be updated is critical. The critical piece of this is being able to track invites on an individual basis. This shouldn't require any user interface changes, just additions to the INFO level logging.
I would like to see two INFO log events added for email invitations with the following information:
1) when the invite is sent
- to what email address
- which user initiated it
- whether it was done through the web/desktop client or API (not critical, but nice-to-have)
- what team the invite was for
- the token
2) when the invite is used
- the token (to relate the event to the previous log event)
- was a new user created as a result? which one?
- if not, which user used it
Non-email invites (aimed at an existing user) should get a similar treatment, although it would be a single log event:
- who initiated it
- what team was the user invited to
If you are willing to also make UI changes related to this, adding a view in the System Console showing invite tokens currently "in flight" and those recently used along with other key information (sent when, by whom, etc.) that would be fantastic. As would be the ability to invalidate individual invites from this UI.
At the aggregate view, it would be neat to be able to see how may invites are sent/used in the system statistics, but that's just a matter of curiosity rather than an operational necessity like individual tracking.
