forked from 0x2620/pandora
site.js, cleanup stream names again
This commit is contained in:
parent
fc4285933a
commit
3d36da45af
8 changed files with 90 additions and 52 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue