From 0aeeaf9e08c95a649bf5664709160f7b6fa0bf83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 14:12:51 +0000 Subject: [PATCH 1/4] Bump minimist from 1.2.5 to 1.2.6 in /dds_web/static Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] --- dds_web/static/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dds_web/static/package-lock.json b/dds_web/static/package-lock.json index 267f6c80b..a35e8613c 100644 --- a/dds_web/static/package-lock.json +++ b/dds_web/static/package-lock.json @@ -3167,9 +3167,9 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "node_modules/minimist-options": { @@ -8566,9 +8566,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "minimist-options": { From 6f7146cb6f9b5a12abc7ece321220a62a054fd16 Mon Sep 17 00:00:00 2001 From: Ina Date: Thu, 31 Mar 2022 16:41:30 +0200 Subject: [PATCH 2/4] unanswered inviteadded --- dds_web/api/project.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dds_web/api/project.py b/dds_web/api/project.py index e54454256..e5d25befb 100644 --- a/dds_web/api/project.py +++ b/dds_web/api/project.py @@ -661,6 +661,7 @@ def post(self): for user in p_info["users_to_add"]: try: existing_user = user_schemas.UserSchema().load(user) + unanswered_invite = user_schemas.UnansweredInvite().load(user) except ( marshmallow.exceptions.ValidationError, sqlalchemy.exc.OperationalError, @@ -673,7 +674,7 @@ def post(self): user_addition_statuses.append(addition_status) continue - if not existing_user: + if not existing_user and not unanswered_invite: # Send invite if the user doesn't exist invite_user_result = AddUser.invite_user( email=user.get("email"), @@ -694,7 +695,7 @@ def post(self): addition_status = "" try: add_user_result = AddUser.add_to_project( - whom=existing_user, + whom=existing_user or unanswered_invite, project=new_project, role=user.get("role"), ) From 80552ac2294a855de55d1e307946d4ac1905c42e Mon Sep 17 00:00:00 2001 From: Ina Date: Fri, 1 Apr 2022 07:14:20 +0200 Subject: [PATCH 3/4] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af812a01..693e92890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,3 +68,4 @@ Please add a _short_ line describing the PR you make, if the PR implements a spe - Add link in navbar to the installation documentation ([#1112](https://github.com/ScilifelabDataCentre/dds_web/pull/1112)) - Change from apscheduler to flask-apscheduler - solves the app context issue ([#1109](https://github.com/ScilifelabDataCentre/dds_web/pull/1109)) - Send an email to all Unit Admins when a Unit Admin has reset their password ([#1110](https://github.com/ScilifelabDataCentre/dds_web/pull/1110)). +- Patch: Add check for unanswered invite when creating project and adding user who is already invited ([#1117](https://github.com/ScilifelabDataCentre/dds_web/pull/1117)) From f0b81b0af7e99461543039e656fcb612bdfde4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20=C3=96stberg?= Date: Sat, 2 Apr 2022 12:07:39 +0200 Subject: [PATCH 4/4] Change default sender to a tuple to show that you can also set a name --- dds_web/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dds_web/config.py b/dds_web/config.py index e0924e200..6e59ddbae 100644 --- a/dds_web/config.py +++ b/dds_web/config.py @@ -55,7 +55,7 @@ class Config(object): MAIL_PASSWORD = os.environ.get("MAIL_PASSWORD", "") MAIL_USE_TLS = False MAIL_USE_SSL = False - MAIL_DEFAULT_SENDER = "dds@noreply.se" + MAIL_DEFAULT_SENDER = ("SciLifeLab DDS", "dds@example.com") TOKEN_ENDPOINT_ACCESS_LIMIT = "10/hour" RATELIMIT_STORAGE_URI = os.environ.get(