site.js, cleanup stream names again

This commit is contained in:
j 2010-02-08 15:56:25 +05:30
commit 3d36da45af
8 changed files with 90 additions and 52 deletions

View file

@ -28,6 +28,11 @@ def getUserJSON(user):
json = {}
for key in ('username', ):
json[key] = getattr(user, key)
json['group'] = 'user'
if user.is_staff:
json['group'] = 'admin'
elif user.has_perm('0x.vip'): #FIXME: permissions
json['group'] = 'vip'
json['preferences'] = getPreferences(user)
return json