summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md12
-rw-r--r--client/components/settings/settingBody.js1
-rw-r--r--models/settings.js29
-rw-r--r--models/users.js8
-rw-r--r--package.json2
-rw-r--r--public/old-wekan-logo.pngbin0 -> 8433 bytes
-rw-r--r--public/wekan-logo.pngbin8433 -> 10342 bytes
-rw-r--r--sandstorm-pkgdef.capnp4
8 files changed, 43 insertions, 13 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f66e110b..e1364c00 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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:
diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js
index 5995cbf1..de96c100 100644
--- a/client/components/settings/settingBody.js
+++ b/client/components/settings/settingBody.js
@@ -101,6 +101,7 @@ BlazeComponent.extendComponent({
// if (!err) {
// TODO - show more info to user
// }
+
this.setLoading(false);
});
}
diff --git a/models/settings.js b/models/settings.js
index 34f693d9..308d867d 100644
--- a/models/settings.js
+++ b/models/settings.js
@@ -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);
+ }
+ });
+ }
}
});
},
diff --git a/models/users.js b/models/users.js
index 5a7fbbe5..9d859664 100644
--- a/models/users.js
+++ b/models/users.js
@@ -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;
+ }
});
}
diff --git a/package.json b/package.json
index 6eb51401..afc3c419 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wekan",
- "version": "1.20.0",
+ "version": "1.21.0",
"description": "The open-source Trello-like kanban",
"private": true,
"scripts": {
diff --git a/public/old-wekan-logo.png b/public/old-wekan-logo.png
new file mode 100644
index 00000000..6a2740f2
--- /dev/null
+++ b/public/old-wekan-logo.png
Binary files differ
diff --git a/public/wekan-logo.png b/public/wekan-logo.png
index 6a2740f2..b553239e 100644
--- a/public/wekan-logo.png
+++ b/public/wekan-logo.png
Binary files differ
diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp
index 6162e2d9..32867885 100644
--- a/sandstorm-pkgdef.capnp
+++ b/sandstorm-pkgdef.capnp
@@ -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,