Currently to get the user name or group you do mw.config.get('wgUserName') or mw.config.get('wgUserGroups').
In Gerrit change 13628 I tried to add wgUserRights. Krinkle has said that this makes the page too heavy though.
What's suggested is that we make new methods in mw.user which are asynchronous, use the API and cache the data.
E.g. mw.user.getName(), mw.user.getGroups(), mw.user.getRights().
Version: unspecified
Severity: enhancement