Merge branch 'devel'

This commit is contained in:
Lauri Ojansivu 2018-07-18 15:15:43 +03:00
commit 2bb80956dd
8 changed files with 43 additions and 13 deletions

View file

@ -1,3 +1,15 @@
# v1.21 2018-07-18 Wekan release
This release adds the following new features:
- [Add logo from Wekan website to login logo](https://github.com/wekan/wekan/commit/4eed23afe06d5fab8d45ba3decc7c1d3b85efbd8).
This release fixes the following bugs:
- [Allow to resend invites](https://github.com/wekan/wekan/pull/1785).
Thanks to GitHub users Akuket and xet7 for their contributions.
# v1.20 2018-07-18 Wekan release
This release fixes the following bugs:

View file

@ -101,6 +101,7 @@ BlazeComponent.extendComponent({
// if (!err) {
// TODO - show more info to user
// }
this.setLoading(false);
});
}

View file

@ -124,20 +124,33 @@ if (Meteor.isServer) {
sendInvitation(emails, boards) {
check(emails, [String]);
check(boards, [String]);
const user = Users.findOne(Meteor.userId());
if(!user.isAdmin){
throw new Meteor.Error('not-allowed');
}
emails.forEach((email) => {
if (email && SimpleSchema.RegEx.Email.test(email)) {
const code = getRandomNum(100000, 999999);
InvitationCodes.insert({code, email, boardsToBeInvited: boards, createdAt: new Date(), authorId: Meteor.userId()}, function(err, _id){
if (!err && _id) {
sendInvitationEmail(_id);
} else {
throw new Meteor.Error('invitation-generated-fail', err.message);
}
});
// Checks if the email is already link to an account.
const userExist = Users.findOne({email});
if (userExist){
throw new Meteor.Error('user-exist', `The user with the email ${email} has already an account.`);
}
// Checks if the email is already link to an invitation.
const invitation = InvitationCodes.findOne({email});
if (invitation){
InvitationCodes.update(invitation, {$set : {boardsToBeInvited: boards}});
sendInvitationEmail(invitation._id);
}else {
const code = getRandomNum(100000, 999999);
InvitationCodes.insert({code, email, boardsToBeInvited: boards, createdAt: new Date(), authorId: Meteor.userId()}, function(err, _id){
if (!err && _id) {
sendInvitationEmail(_id);
} else {
throw new Meteor.Error('invitation-generated-fail', err.message);
}
});
}
}
});
},

View file

@ -501,9 +501,13 @@ if (Meteor.isServer) {
} else {
user.profile = {icode: options.profile.invitationcode};
user.profile.boardView = 'board-view-lists';
}
return user;
// Deletes the invitation code after the user was created successfully.
setTimeout(Meteor.bindEnvironment(() => {
InvitationCodes.remove({'_id': invitationCode._id});
}), 200);
return user;
}
});
}

View file

@ -1,6 +1,6 @@
{
"name": "wekan",
"version": "1.20.0",
"version": "1.21.0",
"description": "The open-source Trello-like kanban",
"private": true,
"scripts": {

BIN
public/old-wekan-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

View file

@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "Wekan"),
# The name of the app as it is displayed to the user.
appVersion = 105,
appVersion = 106,
# Increment this for every release.
appMarketingVersion = (defaultText = "1.20.0~2018-07-18"),
appMarketingVersion = (defaultText = "1.21.0~2018-07-18"),
# Human-readable presentation of the app version.
minUpgradableAppVersion = 0,