mirror of
https://github.com/wekan/wekan.git
synced 2026-01-21 16:56:11 +01:00
Fix avatar support on Sanstorm
The bug comes for 9154b06 which this commit partially reverts. The
synchronization between the user document profile and the Sandstorm
HTTP headers is still not perfect. Having a clean model may requires
the `accounts-sandstorm` to expose a hook to modify the user document
just after the `services.sandstorm` credentials are updated.
Fixes #460
This commit is contained in:
parent
f6c01161a0
commit
d9b74131ae
3 changed files with 16 additions and 16 deletions
|
|
@ -47,19 +47,6 @@ Users.helpers({
|
|||
return _.contains(invitedBoards, boardId);
|
||||
},
|
||||
|
||||
getAvatarUrl() {
|
||||
// Although we put the avatar picture URL in the `profile` object, we need
|
||||
// to support Sandstorm which put in the `picture` attribute by default.
|
||||
// XXX Should we move both cases to `picture`?
|
||||
if (this.picture) {
|
||||
return this.picture;
|
||||
} else if (this.profile && this.profile.avatarUrl) {
|
||||
return this.profile.avatarUrl;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
getInitials() {
|
||||
const profile = this.profile || {};
|
||||
if (profile.initials)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue