Replaced Gravatar with self-hosted avatars
Avatars are now obtained from Blender ID. They are downloaded from Blender ID and stored in the users' home project storage. Avatars can be synced via Celery and triggered from a webhook. The avatar can be obtained from the current user object in Python, or via pillar.api.users.avatar.url(user_dict). Avatars can be shown in the web frontend by: - an explicit image (like before but with a non-Gravatar URL) - a Vue.js component `user-avatar` - a Vue.js component `current-user-avatar` The latter is the most efficient for the current user, as it uses user info that's already injected into the webpage (so requires no extra queries).
This commit is contained in:
@@ -320,7 +320,7 @@ class UserListTests(AbstractPillarTest):
|
||||
|
||||
user_info = json.loads(resp.data)
|
||||
regular_info = remove_private_keys(user_info)
|
||||
self.assertEqual(PUBLIC_USER_FIELDS, set(regular_info.keys()))
|
||||
self.assertEqual(set(), set(regular_info.keys()) - PUBLIC_USER_FIELDS)
|
||||
|
||||
def test_own_user_subscriber(self):
|
||||
# Regular access should result in only your own info.
|
||||
@@ -342,7 +342,7 @@ class UserListTests(AbstractPillarTest):
|
||||
self.assertNotIn('auth', user_info)
|
||||
|
||||
regular_info = remove_private_keys(user_info)
|
||||
self.assertEqual(PUBLIC_USER_FIELDS, set(regular_info.keys()))
|
||||
self.assertEqual(set(), set(regular_info.keys()) - PUBLIC_USER_FIELDS)
|
||||
|
||||
def test_put_user(self):
|
||||
from pillar.api.utils import remove_private_keys
|
||||
|
Reference in New Issue
Block a user