mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Upgrade kenton:accounts-sandstorm package to 0.1.6
We now delegates more user attributes sync (avatar and permissions) to this package instead of doing it ourselves.
This commit is contained in:
parent
7a5f030cc8
commit
9154b06fc3
4 changed files with 25 additions and 22 deletions
|
|
@ -35,6 +35,19 @@ Users.helpers({
|
|||
_.where(board.members, {userId: this._id})[0].isAdmin;
|
||||
},
|
||||
|
||||
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