Show author badges on assets and comments
Comments layout is still broken, marked as TODO(Pablo).
This commit is contained in:
@@ -142,7 +142,7 @@ def after_fetching_user(user):
|
||||
return
|
||||
|
||||
# Remove all fields except public ones.
|
||||
public_fields = {'full_name', 'username', 'email', 'extension_props_public'}
|
||||
public_fields = {'full_name', 'username', 'email', 'extension_props_public', 'badges'}
|
||||
for field in list(user.keys()):
|
||||
if field not in public_fields:
|
||||
del user[field]
|
||||
|
@@ -33,7 +33,8 @@ def get_user_info(user_id):
|
||||
# TODO: put those fields into a config var or module-level global.
|
||||
return {'email': user.email,
|
||||
'full_name': user.full_name,
|
||||
'username': user.username}
|
||||
'username': user.username,
|
||||
'badges_html': (user.badges and user.badges.html) or ''}
|
||||
|
||||
|
||||
def setup_app(app):
|
||||
|
Reference in New Issue
Block a user