mirror of
https://github.com/plankanban/planka.git
synced 2025-12-20 09:15:39 +03:00
feat: Add ability to use Gravatar as avatar provider (#1319)
Closes #1243
This commit is contained in:
@@ -36,6 +36,12 @@ module.exports = {
|
||||
termsType: sails.hooks.terms.getTypeByUserRole(inputs.record.role),
|
||||
};
|
||||
|
||||
const gravatarUrl = sails.helpers.users.buildGravatarUrl(inputs.record);
|
||||
|
||||
if (gravatarUrl) {
|
||||
data.gravatarUrl = gravatarUrl;
|
||||
}
|
||||
|
||||
if (inputs.user) {
|
||||
const isForCurrentUser = inputs.record.id === inputs.user.id;
|
||||
const isForAdmin = inputs.user.role === User.Roles.ADMIN;
|
||||
|
||||
Reference in New Issue
Block a user