From fd161c5cfdfc226f1ce77dc93ea5645240c9b1a1 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Mon, 8 Nov 2021 09:46:10 -0600 Subject: [PATCH 01/21] resistration page changes --- Backend/database.py | 2 +- UI/src/forms/RegistrationForm.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Backend/database.py b/Backend/database.py index 4be739a..d457fc2 100644 --- a/Backend/database.py +++ b/Backend/database.py @@ -119,7 +119,7 @@ def add_new_user(email, password, user_type, created_time_utc, modified_time_utc organization_name): user_collection = myDB["Users"] user_type_doc = get_user_type(user_type) - user_status_doc = get_user_status("active") + user_status_doc = get_user_status("registered") new_user = {"email": email, "password": password, "userType": user_type_doc["_id"], "userStatus": user_status_doc["_id"], "created": created_time_utc, "modified": modified_time_utc, "firstName": first_name, "secondName": second_name, diff --git a/UI/src/forms/RegistrationForm.js b/UI/src/forms/RegistrationForm.js index 0ebed78..12d92ea 100644 --- a/UI/src/forms/RegistrationForm.js +++ b/UI/src/forms/RegistrationForm.js @@ -121,7 +121,7 @@ const RegistrationForm = () => { if (response == 'registered') { return (
- +
); From 601ab749f1b946917065445a8883d04faadd2195 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 9 Nov 2021 15:33:50 -0600 Subject: [PATCH 02/21] password reset link added correctly and user status changed to registered while registering --- Backend/EmailTemplateForgotpassword.txt | 8 ++++++++ Backend/registration.py | 13 ++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 Backend/EmailTemplateForgotpassword.txt diff --git a/Backend/EmailTemplateForgotpassword.txt b/Backend/EmailTemplateForgotpassword.txt new file mode 100644 index 0000000..ffba777 --- /dev/null +++ b/Backend/EmailTemplateForgotpassword.txt @@ -0,0 +1,8 @@ + + + + +

Link:

+Click here to reset password + + \ No newline at end of file diff --git a/Backend/registration.py b/Backend/registration.py index b909c7b..aa24afa 100644 --- a/Backend/registration.py +++ b/Backend/registration.py @@ -5,6 +5,7 @@ from dotenv import load_dotenv from argon2 import PasswordHasher from argon2.exceptions import HashingError, VerificationError, VerifyMismatchError, InvalidHash +from pymongo import message import database import smtplib from email.mime.multipart import MIMEMultipart @@ -187,11 +188,13 @@ def email_content(email_address, body): msg['Subject'] = 'Industrial Badger - Password Reset' msg['From'] = sender_email msg['To'] = receiver_email - msg_text = MIMEText('%s' % body, 'html') - text = 'Go ahead and reset the password using the given link: http://localhost:3000/passwordchange' - msg_text1 = MIMEText(text, "plain") + + message = """\ +

\n

+ Click here to reset password + """ + msg_text = MIMEText('%s' % (body + message), 'html') msg.attach(msg_text) - msg.attach(msg_text1) try: with smtplib.SMTP('smtp.office365.com', 587) as smtpObj: @@ -211,7 +214,7 @@ def password_reset_email(email): user_doc = database.get_user_details(email) if len(user_doc) > 0: password = generate_strong_password() - email_content(email, "This is your new password: " + password) + email_content(email, "This is your new temporary password: " + password) password_reset(email, password) return "Email sent successfully" return "user does not exist" From a6e8d87dc81482c7b286c4c9553785e1e963fa09 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 9 Nov 2021 20:37:29 -0600 Subject: [PATCH 03/21] login validation for when user is active done --- Backend/EmailTemplateForgotpassword.txt | 8 ------ Backend/login.py | 14 ++++++---- Backend/registration.py | 34 ++++++++++++++++++++++++- UI/package-lock.json | 29 +++++++++++++++++++++ UI/package.json | 1 + 5 files changed, 72 insertions(+), 14 deletions(-) delete mode 100644 Backend/EmailTemplateForgotpassword.txt diff --git a/Backend/EmailTemplateForgotpassword.txt b/Backend/EmailTemplateForgotpassword.txt deleted file mode 100644 index ffba777..0000000 --- a/Backend/EmailTemplateForgotpassword.txt +++ /dev/null @@ -1,8 +0,0 @@ - - - - -

Link:

-Click here to reset password - - \ No newline at end of file diff --git a/Backend/login.py b/Backend/login.py index 205edce..015d8fe 100644 --- a/Backend/login.py +++ b/Backend/login.py @@ -16,12 +16,16 @@ def login(email, password): return "email is not correct" user_doc = database.get_user_details(email.lower()) if len(user_doc) > 0: - try: - if password_hash.verify(user_doc['password'], password): - return str(ObjectId(user_doc['userType'])) + if (user_doc['userStatus'] == "active"): + try: + if password_hash.verify(user_doc['password'], password): + return str(ObjectId(user_doc['userType'])) + + except (InvalidHash, HashingError, VerificationError, VerifyMismatchError): + return "password is wrong" + else: + return "please confirm and activate your account" - except (InvalidHash, HashingError, VerificationError, VerifyMismatchError): - return "password is wrong" return "user does not exist" diff --git a/Backend/registration.py b/Backend/registration.py index aa24afa..a5b9b27 100644 --- a/Backend/registration.py +++ b/Backend/registration.py @@ -100,6 +100,33 @@ def generate_strong_password(): password = password + x return password +def email_confirmation(email_address): + env_path = 'backend_variable.env' + load_dotenv(dotenv_path=env_path) + sender_email = "No-replyBadge@cscportal.onmicrosoft.com" + receiver_email = email_address + + msg = MIMEMultipart() + msg['Subject'] = 'Industrial Badger - Confirm and activate email' + msg['From'] = sender_email + msg['To'] = receiver_email + + message = """\ +

Please click on the link below to activate your email

+ Click here to activate your email + """ + msg_text = MIMEText('%s' % message, 'html') + msg.attach(msg_text) + + try: + with smtplib.SMTP('smtp.office365.com', 587) as smtpObj: + smtpObj.ehlo() + smtpObj.starttls() + smtpObj.login(os.getenv("MAIL_USERNAME"), os.getenv("MAIL_PASSWORD")) + smtpObj.sendmail(sender_email, receiver_email, msg.as_string()) + except Exception as e: + print(e) + def register(email, password, user_type, first_name, second_name, middle_name, organization_name): if validate_email_exist(email.lower()) == "email already exists": @@ -124,7 +151,8 @@ def register(email, password, user_type, first_name, second_name, middle_name, o email, hashed_password, new_user_type, created_time_utc, modified_time_utc, first_name, second_name, middle_name, organization_name) if len(new_user_id) > 0: - return "registered" + email_confirmation(email) + return "registered" return None @@ -218,3 +246,7 @@ def password_reset_email(email): password_reset(email, password) return "Email sent successfully" return "user does not exist" + + + + diff --git a/UI/package-lock.json b/UI/package-lock.json index 5bf3aa2..d7a0ec3 100644 --- a/UI/package-lock.json +++ b/UI/package-lock.json @@ -5631,6 +5631,15 @@ } } }, + "email-verification-code": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/email-verification-code/-/email-verification-code-2.0.4.tgz", + "integrity": "sha512-73BTl2ENUSIp1J34W6lnuxbNvd8djP+2dVTDLCl6TZZOGEhk2p4WUDkNnxCQb1rzmN3K6JroNYg4IeVW/WBYpA==", + "requires": { + "nodemailer": "^6.4.16", + "uuid-token-generator": "^1.0.0" + } + }, "emittery": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", @@ -10880,6 +10889,11 @@ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==" }, + "nodemailer": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.0.tgz", + "integrity": "sha512-AtiTVUFHLiiDnMQ43zi0YgkzHOEWUkhDgPlBXrsDzJiJvB29Alo4OKxHQ0ugF3gRqRQIneCLtZU3yiUo7pItZw==" + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -15668,6 +15682,21 @@ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "optional": true }, + "uuid-token-generator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uuid-token-generator/-/uuid-token-generator-1.0.0.tgz", + "integrity": "sha1-NtsJH2a5TJPwrcJIVo+kc3EWN9s=", + "requires": { + "uuid": "^3.0.0" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", diff --git a/UI/package.json b/UI/package.json index 1e274e5..d760ae5 100644 --- a/UI/package.json +++ b/UI/package.json @@ -10,6 +10,7 @@ "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^12.6.3", "cors": "^2.8.5", + "email-verification-code": "^2.0.4", "jquery": "^3.5.1", "moment": "^2.29.1", "react": "^17.0.1", From 127f863d5a22eae2dae5d2adc663f3ed7fa214fa Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Wed, 10 Nov 2021 10:23:31 -0600 Subject: [PATCH 04/21] userstatus validation with object ID --- Backend/login.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Backend/login.py b/Backend/login.py index 015d8fe..842f0e0 100644 --- a/Backend/login.py +++ b/Backend/login.py @@ -16,7 +16,7 @@ def login(email, password): return "email is not correct" user_doc = database.get_user_details(email.lower()) if len(user_doc) > 0: - if (user_doc['userStatus'] == "active"): + if (user_doc['userStatus'] == ObjectId('5f776e5d6289f17659874f27')): try: if password_hash.verify(user_doc['password'], password): return str(ObjectId(user_doc['userType'])) From dbae0cb32a97d76439ddcfebcaa19ff17371f28e Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Thu, 11 Nov 2021 22:25:11 -0600 Subject: [PATCH 05/21] confirmationcode being sent out to the user and the db schema structure has been updated --- Backend/database.py | 4 ++-- Backend/registration.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Backend/database.py b/Backend/database.py index d457fc2..4e38a1f 100644 --- a/Backend/database.py +++ b/Backend/database.py @@ -116,14 +116,14 @@ def update_user_password(email, hashed_password): def add_new_user(email, password, user_type, created_time_utc, modified_time_utc, first_name, second_name, middle_name, - organization_name): + organization_name,hashed_code): user_collection = myDB["Users"] user_type_doc = get_user_type(user_type) user_status_doc = get_user_status("registered") new_user = {"email": email, "password": password, "userType": user_type_doc["_id"], "userStatus": user_status_doc["_id"], "created": created_time_utc, "modified": modified_time_utc, "firstName": first_name, "secondName": second_name, - "middleName": middle_name, "organizationName": organization_name} + "middleName": middle_name, "organizationName": organization_name, "confirmationCode": hashed_code} new_user_doc = user_collection.insert_one(new_user) return str(new_user_doc.inserted_id) diff --git a/Backend/registration.py b/Backend/registration.py index a5b9b27..0b81b51 100644 --- a/Backend/registration.py +++ b/Backend/registration.py @@ -100,7 +100,7 @@ def generate_strong_password(): password = password + x return password -def email_confirmation(email_address): +def email_confirmation(email_address,body): env_path = 'backend_variable.env' load_dotenv(dotenv_path=env_path) sender_email = "No-replyBadge@cscportal.onmicrosoft.com" @@ -115,7 +115,7 @@ def email_confirmation(email_address):

Please click on the link below to activate your email

Click here to activate your email """ - msg_text = MIMEText('%s' % message, 'html') + msg_text = MIMEText('%s' % (body+ message), 'html') msg.attach(msg_text) try: @@ -145,13 +145,17 @@ def register(email, password, user_type, first_name, second_name, middle_name, o new_user_type = user_type_validation(user_type) if new_user_type == INVALID_USER_TYPE_MESSAGE: return INVALID_USER_TYPE_MESSAGE + + confirmation_code = generate_strong_password() hashed_password = hash_password(password) + #confirmation_code_hash = PasswordHasher() + hashed_code = hash_password(confirmation_code) new_user_id = database.add_new_user( email, hashed_password, new_user_type, created_time_utc, modified_time_utc, first_name, second_name, - middle_name, organization_name) + middle_name, organization_name, hashed_code) if len(new_user_id) > 0: - email_confirmation(email) + email_confirmation(email, "This is your activation code: " + confirmation_code) return "registered" return None From 0554f5886d73eff6289c01b6ec8bfbf8ff917c93 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Thu, 11 Nov 2021 23:53:13 -0600 Subject: [PATCH 06/21] API to activate the user and set the status to active has been created --- Backend/activate.py | 34 ++++++++++++++++++++++++++++++++++ Backend/app.py | 17 +++++++++++++++++ Backend/database.py | 14 ++++++++++++++ Backend/registration.py | 1 - UI/src/API/ActivateUserAPI.js | 27 +++++++++++++++++++++++++++ 5 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 Backend/activate.py create mode 100644 UI/src/API/ActivateUserAPI.js diff --git a/Backend/activate.py b/Backend/activate.py new file mode 100644 index 0000000..0f89aab --- /dev/null +++ b/Backend/activate.py @@ -0,0 +1,34 @@ +import re +from bson.objectid import ObjectId +from argon2 import PasswordHasher +from argon2.exceptions import HashingError, VerificationError, VerifyMismatchError, InvalidHash +import database +import login + +VALID = r"valid" +INVALID = r"invalid" +EMAIL_NOT_EXIST = r'email does not exist' + +def activateuser(email , confirmationCode): + confirmation_code_hash = PasswordHasher() + if email == "": + return "email is empty" + if validate_email_address(email) == INVALID: + return "email is not correct" + user_doc = database.get_user_details(email.lower()) + if len(user_doc) > 0: + try: + isMatch = confirmation_code_hash.verify(user_doc['confirmationCode'], confirmationCode) + if(isMatch): + database.modify_user_status(email) + return "You have now been activated. Please go ahead and login" + except (InvalidHash, HashingError, VerificationError, VerifyMismatchError): + return "Confirmation code do not match. Please check your email." + return "user does not exist" + + +def validate_email_address(email_address): + regex = r'^[a-z0-9]+[\._]?[a-z0-9]+[@]\w+[.]\w{2,3}$' + if re.search(regex, email_address) and email_address.strip() != "" and email_address is not None: + return VALID + return INVALID \ No newline at end of file diff --git a/Backend/app.py b/Backend/app.py index 3f61279..29d761f 100644 --- a/Backend/app.py +++ b/Backend/app.py @@ -4,6 +4,7 @@ from pymongo import database import login import registration +import activate import view_badge import create_badge import view_users @@ -72,6 +73,22 @@ def register_user(): organization_name) +@app.route("/activate", methods=['POST']) +def activate_user(): + req_body = request.get_json() + if req_body['email'] == "None": + email_id_list = "" + else: + email_id_list = req_body['email'] + if req_body['confirmationCode'] == "None": + confirmationCode_list = "" + else: + confirmationCode_list = req_body['confirmationCode'] + #email = req_body['email'] + #confirmationCode = req_body['confirmationCode'] + return activate.activateuser(email_id_list,confirmationCode_list) + + @app.route("/updateuser", methods=['POST']) def update_user_details(): req_body = request.get_json() diff --git a/Backend/database.py b/Backend/database.py index 4e38a1f..2d46e49 100644 --- a/Backend/database.py +++ b/Backend/database.py @@ -1321,3 +1321,17 @@ def get_badge_type_options(): json = dumps(badge_type_doc, indent=2) return json + +def modify_user_status(email): + user_collection = myDB["Users"] + user_collection.find_one_and_update( + {"email": email}, + { + "$set": {"userStatus": ObjectId('5f776e5d6289f17659874f27') , "modified": datetime.now(timezone.utc) + } + }, upsert=True + ) + return "updated" + + + diff --git a/Backend/registration.py b/Backend/registration.py index 0b81b51..5fac6a1 100644 --- a/Backend/registration.py +++ b/Backend/registration.py @@ -148,7 +148,6 @@ def register(email, password, user_type, first_name, second_name, middle_name, o confirmation_code = generate_strong_password() hashed_password = hash_password(password) - #confirmation_code_hash = PasswordHasher() hashed_code = hash_password(confirmation_code) new_user_id = database.add_new_user( diff --git a/UI/src/API/ActivateUserAPI.js b/UI/src/API/ActivateUserAPI.js new file mode 100644 index 0000000..105a965 --- /dev/null +++ b/UI/src/API/ActivateUserAPI.js @@ -0,0 +1,27 @@ +const getactivateResponse = async(email, confirmationCode) => { + + var url = process.env.REACT_APP_APILINK+'/activate?email=' + email + '&confirmationCode=' + confirmationCode; + return await fetch(url, { + method: 'POST' + //Request Type + }) + .then((response) => response.text()) + //If response is in json then in success + .then((responseText) => { + //Success + // alert(JSON.stringify(responseJson)); + console.log(responseText); + return responseText; + }) + //If response is not in json then in error + .catch((error) => { + //Error + // alert(JSON.stringify(error)); + console.error(error); + return error; + }); +} + + + +export default getactivateResponse; \ No newline at end of file From 6be427075294bc60e87bd71ecf0da24bd18f21f2 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Fri, 12 Nov 2021 10:46:39 -0600 Subject: [PATCH 07/21] Request email and confirm email for the users are done and in place. --- Backend/activate.py | 2 +- UI/src/API/ActivateUserAPI.js | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Backend/activate.py b/Backend/activate.py index 0f89aab..f99d58f 100644 --- a/Backend/activate.py +++ b/Backend/activate.py @@ -15,7 +15,7 @@ def activateuser(email , confirmationCode): return "email is empty" if validate_email_address(email) == INVALID: return "email is not correct" - user_doc = database.get_user_details(email.lower()) + user_doc = database.get_user_details(email) if len(user_doc) > 0: try: isMatch = confirmation_code_hash.verify(user_doc['confirmationCode'], confirmationCode) diff --git a/UI/src/API/ActivateUserAPI.js b/UI/src/API/ActivateUserAPI.js index 105a965..891f39a 100644 --- a/UI/src/API/ActivateUserAPI.js +++ b/UI/src/API/ActivateUserAPI.js @@ -1,15 +1,22 @@ const getactivateResponse = async(email, confirmationCode) => { - var url = process.env.REACT_APP_APILINK+'/activate?email=' + email + '&confirmationCode=' + confirmationCode; + var url = process.env.REACT_APP_APILINK+'/activate'; return await fetch(url, { - method: 'POST' - //Request Type + method: 'POST', + body: JSON.stringify({email: email, + confirmationCode:confirmationCode, + }), + headers: { + 'Accept':'application/json', + 'Content-Type':'application/json' + } }) - .then((response) => response.text()) - //If response is in json then in success + .then((response) => response.text()) + // If response is in json then in success .then((responseText) => { //Success // alert(JSON.stringify(responseJson)); + //console.log("in here") console.log(responseText); return responseText; }) @@ -17,6 +24,7 @@ const getactivateResponse = async(email, confirmationCode) => { .catch((error) => { //Error // alert(JSON.stringify(error)); + console.log("error") console.error(error); return error; }); From 40471bcec43dd0c653bd91133b6e2156210a7531 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Fri, 12 Nov 2021 14:22:02 -0600 Subject: [PATCH 08/21] validations added if user is already active --- Backend/activate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Backend/activate.py b/Backend/activate.py index f99d58f..ae273b8 100644 --- a/Backend/activate.py +++ b/Backend/activate.py @@ -17,6 +17,8 @@ def activateuser(email , confirmationCode): return "email is not correct" user_doc = database.get_user_details(email) if len(user_doc) > 0: + if(user_doc['userStatus'] == ObjectId('5f776e5d6289f17659874f27')): + return "User is already active. Please proceed to login." try: isMatch = confirmation_code_hash.verify(user_doc['confirmationCode'], confirmationCode) if(isMatch): From a78a09eb8fc1c3d0b86f3de6f3d2163b17f6a555 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Mon, 15 Nov 2021 21:58:05 -0600 Subject: [PATCH 09/21] modified the confirmation code send to the user and once active the confirmation code field gets removed from db. --- Backend/activate.py | 10 ++++------ Backend/app.py | 2 -- Backend/database.py | 21 +++++++++++++++------ Backend/registration.py | 7 ++++--- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Backend/activate.py b/Backend/activate.py index ae273b8..8ed2c7c 100644 --- a/Backend/activate.py +++ b/Backend/activate.py @@ -10,7 +10,6 @@ EMAIL_NOT_EXIST = r'email does not exist' def activateuser(email , confirmationCode): - confirmation_code_hash = PasswordHasher() if email == "": return "email is empty" if validate_email_address(email) == INVALID: @@ -19,13 +18,12 @@ def activateuser(email , confirmationCode): if len(user_doc) > 0: if(user_doc['userStatus'] == ObjectId('5f776e5d6289f17659874f27')): return "User is already active. Please proceed to login." - try: - isMatch = confirmation_code_hash.verify(user_doc['confirmationCode'], confirmationCode) - if(isMatch): + else: + if(user_doc['confirmation_code'] == confirmationCode): database.modify_user_status(email) return "You have now been activated. Please go ahead and login" - except (InvalidHash, HashingError, VerificationError, VerifyMismatchError): - return "Confirmation code do not match. Please check your email." + else: + return "Confirmation code do not match. Please check your email." return "user does not exist" diff --git a/Backend/app.py b/Backend/app.py index 29d761f..5fb635b 100644 --- a/Backend/app.py +++ b/Backend/app.py @@ -84,8 +84,6 @@ def activate_user(): confirmationCode_list = "" else: confirmationCode_list = req_body['confirmationCode'] - #email = req_body['email'] - #confirmationCode = req_body['confirmationCode'] return activate.activateuser(email_id_list,confirmationCode_list) diff --git a/Backend/database.py b/Backend/database.py index 2d46e49..a5c791d 100644 --- a/Backend/database.py +++ b/Backend/database.py @@ -116,15 +116,21 @@ def update_user_password(email, hashed_password): def add_new_user(email, password, user_type, created_time_utc, modified_time_utc, first_name, second_name, middle_name, - organization_name,hashed_code): + organization_name,confirmation_code): user_collection = myDB["Users"] user_type_doc = get_user_type(user_type) user_status_doc = get_user_status("registered") new_user = {"email": email, "password": password, "userType": user_type_doc["_id"], "userStatus": user_status_doc["_id"], "created": created_time_utc, "modified": modified_time_utc, "firstName": first_name, "secondName": second_name, - "middleName": middle_name, "organizationName": organization_name, "confirmationCode": hashed_code} + "middleName": middle_name, "organizationName": organization_name} new_user_doc = user_collection.insert_one(new_user) + user_collection.update( + {"email": email}, + { + "$set": {"confirmation_code": confirmation_code} + }, upsert=False + ) return str(new_user_doc.inserted_id) def modify_existing_user(userid, first_name, second_name, middle_name, organization_name): @@ -1331,7 +1337,10 @@ def modify_user_status(email): } }, upsert=True ) - return "updated" - - - + user_collection.update( + {"email": email}, + { + "$unset": {"confirmation_code": ""} + }, upsert=False + ) + return "updated" \ No newline at end of file diff --git a/Backend/registration.py b/Backend/registration.py index 5fac6a1..4b76ce6 100644 --- a/Backend/registration.py +++ b/Backend/registration.py @@ -12,6 +12,7 @@ from email.mime.text import MIMEText import random import array +import math from bson.objectid import ObjectId VALID = r"valid" @@ -100,6 +101,7 @@ def generate_strong_password(): password = password + x return password + def email_confirmation(email_address,body): env_path = 'backend_variable.env' load_dotenv(dotenv_path=env_path) @@ -148,11 +150,10 @@ def register(email, password, user_type, first_name, second_name, middle_name, o confirmation_code = generate_strong_password() hashed_password = hash_password(password) - hashed_code = hash_password(confirmation_code) - + new_user_id = database.add_new_user( email, hashed_password, new_user_type, created_time_utc, modified_time_utc, first_name, second_name, - middle_name, organization_name, hashed_code) + middle_name, organization_name, confirmation_code) if len(new_user_id) > 0: email_confirmation(email, "This is your activation code: " + confirmation_code) return "registered" From e0b451596e593d96476a0d66a78885dae7477391 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 16 Nov 2021 18:04:38 -0600 Subject: [PATCH 10/21] hide the variables --- Backend/.htaccess | 6 ++++++ Backend/backend_variable.env | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 Backend/.htaccess diff --git a/Backend/.htaccess b/Backend/.htaccess new file mode 100644 index 0000000..202e56c --- /dev/null +++ b/Backend/.htaccess @@ -0,0 +1,6 @@ +# STRONG HTACCESS PROTECTION + + order allow,deny + deny from all + satisfy all + \ No newline at end of file diff --git a/Backend/backend_variable.env b/Backend/backend_variable.env index 5f2a26a..765c53a 100644 --- a/Backend/backend_variable.env +++ b/Backend/backend_variable.env @@ -4,7 +4,7 @@ DEBUG = True MAIL_SERVER = 'smtp.office365.com' MAIL_PORT = 587 MAIL_USERNAME = No-replyBadge@cscportal.onmicrosoft.com -MAIL_PASSWORD = P@noply@123 +MAIL_PASSWORD = Industri@lizeD@11162021 MAIL_USE_TLS = True MAIL_USE_SSL = True From a31e02f5be2ab9f5ff3cfdd03657db350db5a8c4 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 16 Nov 2021 18:07:14 -0600 Subject: [PATCH 11/21] changes --- Backend/.htaccess | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Backend/.htaccess b/Backend/.htaccess index 202e56c..5479366 100644 --- a/Backend/.htaccess +++ b/Backend/.htaccess @@ -1,6 +1,5 @@ # STRONG HTACCESS PROTECTION - - order allow,deny - deny from all - satisfy all + + Order allow,deny + Deny from all \ No newline at end of file From 9d482703c76e8acc6ac17bbea9f4a476fff91fe9 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 16 Nov 2021 18:20:06 -0600 Subject: [PATCH 12/21] hiding changes --- Backend/.htaccess | 5 ----- UI/.gitignore | 1 + UI/package-lock.json | 13 ++++++++++--- UI/package.json | 1 + UI/src/index.js | 1 + 5 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 Backend/.htaccess diff --git a/Backend/.htaccess b/Backend/.htaccess deleted file mode 100644 index 5479366..0000000 --- a/Backend/.htaccess +++ /dev/null @@ -1,5 +0,0 @@ -# STRONG HTACCESS PROTECTION - - Order allow,deny - Deny from all - \ No newline at end of file diff --git a/UI/.gitignore b/UI/.gitignore index 4d29575..219a851 100644 --- a/UI/.gitignore +++ b/UI/.gitignore @@ -4,6 +4,7 @@ /node_modules /.pnp .pnp.js +/backend_variable.env # testing /coverage diff --git a/UI/package-lock.json b/UI/package-lock.json index d7a0ec3..df66ab6 100644 --- a/UI/package-lock.json +++ b/UI/package-lock.json @@ -5561,9 +5561,9 @@ } }, "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" }, "dotenv-expand": { "version": "5.1.0", @@ -13144,6 +13144,13 @@ "webpack-dev-server": "3.11.0", "webpack-manifest-plugin": "2.2.0", "workbox-webpack-plugin": "5.1.4" + }, + "dependencies": { + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + } } }, "react-transition-group": { diff --git a/UI/package.json b/UI/package.json index d760ae5..6a1a324 100644 --- a/UI/package.json +++ b/UI/package.json @@ -10,6 +10,7 @@ "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^12.6.3", "cors": "^2.8.5", + "dotenv": "^10.0.0", "email-verification-code": "^2.0.4", "jquery": "^3.5.1", "moment": "^2.29.1", diff --git a/UI/src/index.js b/UI/src/index.js index ef2edf8..de46f4a 100644 --- a/UI/src/index.js +++ b/UI/src/index.js @@ -4,6 +4,7 @@ import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; + ReactDOM.render( From 64aa34b9f3fbcbf6425073bd7054f2f8bf788afb Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 16 Nov 2021 18:30:12 -0600 Subject: [PATCH 13/21] hiding files --- Backend/.gitignore | 1 + UI/.gitignore | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Backend/.gitignore diff --git a/Backend/.gitignore b/Backend/.gitignore new file mode 100644 index 0000000..75422e2 --- /dev/null +++ b/Backend/.gitignore @@ -0,0 +1 @@ +backend_variable.env \ No newline at end of file diff --git a/UI/.gitignore b/UI/.gitignore index 219a851..eb19bdd 100644 --- a/UI/.gitignore +++ b/UI/.gitignore @@ -4,7 +4,7 @@ /node_modules /.pnp .pnp.js -/backend_variable.env + # testing /coverage From 95dcd0c1c654c432575b7a1bc9967c2a713cf6b5 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 16 Nov 2021 18:32:16 -0600 Subject: [PATCH 14/21] c --- Backend/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Backend/.gitignore b/Backend/.gitignore index 75422e2..2eea525 100644 --- a/Backend/.gitignore +++ b/Backend/.gitignore @@ -1 +1 @@ -backend_variable.env \ No newline at end of file +.env \ No newline at end of file From 110b47abf78289dc8c9f1f7a27c56721ff9a0ffb Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 16 Nov 2021 18:53:18 -0600 Subject: [PATCH 15/21] c --- .idea/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.idea/.gitignore b/.idea/.gitignore index c98cb85..ded6084 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -1,6 +1,7 @@ # Default ignored files /shelf/ /workspace.xml +.\backend_variable.env # Datasource local storage ignored files /../../../../../../../:\Users\sriks\AI_Panoply\AI_Panoply_Enterprise\DXC-Industrialized-AI-Badge-Platform\.idea/dataSources/ /dataSources.local.xml From a12c4d0927733130ba82399f5bb2caec2cac2e58 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 16 Nov 2021 19:00:50 -0600 Subject: [PATCH 16/21] c --- .idea/.gitignore | 1 - Backend/.gitignore | 2 +- Backend/backend_variable.env | 15 --------------- 3 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 Backend/backend_variable.env diff --git a/.idea/.gitignore b/.idea/.gitignore index ded6084..c98cb85 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -1,7 +1,6 @@ # Default ignored files /shelf/ /workspace.xml -.\backend_variable.env # Datasource local storage ignored files /../../../../../../../:\Users\sriks\AI_Panoply\AI_Panoply_Enterprise\DXC-Industrialized-AI-Badge-Platform\.idea/dataSources/ /dataSources.local.xml diff --git a/Backend/.gitignore b/Backend/.gitignore index 2eea525..424c49e 100644 --- a/Backend/.gitignore +++ b/Backend/.gitignore @@ -1 +1 @@ -.env \ No newline at end of file +.\backend_variable.env \ No newline at end of file diff --git a/Backend/backend_variable.env b/Backend/backend_variable.env deleted file mode 100644 index 765c53a..0000000 --- a/Backend/backend_variable.env +++ /dev/null @@ -1,15 +0,0 @@ - -# SMTP VARIABLES -DEBUG = True -MAIL_SERVER = 'smtp.office365.com' -MAIL_PORT = 587 -MAIL_USERNAME = No-replyBadge@cscportal.onmicrosoft.com -MAIL_PASSWORD = Industri@lizeD@11162021 -MAIL_USE_TLS = True -MAIL_USE_SSL = True - - -# DATABASE VARIABLES -DB_NAME = Panoply -DB_CONNECTION_STRING = 'mongodb+srv://dbuser:admin123@panoplycluster0.ssmov.mongodb.net/Panoply?retryWrites=true&w=majority' - From da4f18d8692163140f4b6fdd43088966bfbfa985 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 16 Nov 2021 19:04:09 -0600 Subject: [PATCH 17/21] c --- Backend/.gitignore | 2 +- Backend/backend_variable.env | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Backend/.gitignore b/Backend/.gitignore index 75422e2..424c49e 100644 --- a/Backend/.gitignore +++ b/Backend/.gitignore @@ -1 +1 @@ -backend_variable.env \ No newline at end of file +.\backend_variable.env \ No newline at end of file diff --git a/Backend/backend_variable.env b/Backend/backend_variable.env index 765c53a..f6732e0 100644 --- a/Backend/backend_variable.env +++ b/Backend/backend_variable.env @@ -11,5 +11,4 @@ MAIL_USE_SSL = True # DATABASE VARIABLES DB_NAME = Panoply -DB_CONNECTION_STRING = 'mongodb+srv://dbuser:admin123@panoplycluster0.ssmov.mongodb.net/Panoply?retryWrites=true&w=majority' - +DB_CONNECTION_STRING = 'mongodb+srv://dbuser:admin123@panoplycluster0.ssmov.mongodb.net/Panoply?retryWrites=true&w=majority' \ No newline at end of file From 98a7940c4d6b7bac81eff373efa5e078549f18a3 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Tue, 16 Nov 2021 23:24:23 -0600 Subject: [PATCH 18/21] c --- Backend/.gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Backend/.gitignore diff --git a/Backend/.gitignore b/Backend/.gitignore deleted file mode 100644 index 424c49e..0000000 --- a/Backend/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.\backend_variable.env \ No newline at end of file From 6c3ef44dcc5a8ecf66477af911772970d8847a9a Mon Sep 17 00:00:00 2001 From: sabar Date: Thu, 18 Nov 2021 15:52:12 -0500 Subject: [PATCH 19/21] New Activate page and PW route New Activate page has been created. once user successfully activates it will redirect to login page password reset page will reroute to login page after successful login --- UI/src/API/AccountActivateAPI.js | 29 +++++ UI/src/App.js | 2 + UI/src/forms/AccountActivate.js | 169 +++++++++++++++++++++++++++++ UI/src/forms/PasswordChange.js | 180 ++++++++++++++++--------------- UI/src/forms/RegistrationForm.js | 2 +- 5 files changed, 297 insertions(+), 85 deletions(-) create mode 100644 UI/src/API/AccountActivateAPI.js create mode 100644 UI/src/forms/AccountActivate.js diff --git a/UI/src/API/AccountActivateAPI.js b/UI/src/API/AccountActivateAPI.js new file mode 100644 index 0000000..4fd4b54 --- /dev/null +++ b/UI/src/API/AccountActivateAPI.js @@ -0,0 +1,29 @@ +const getaccountactivateresponse = async (useremail,activationcode) => { + + var data = new FormData(); + data.append("email", useremail); + data.append("confirmationCode", activationcode); + + + var url = process.env.REACT_APP_APILINK+'/activate'; + return await fetch(url, { + method: 'POST', + body: JSON.stringify({email:useremail,confirmationCode:activationcode}), + headers: { + 'Accept':'application/json', + 'Content-Type':'application/json' + } + }) + .then((response) => {return response.text()}) + + //If response is not in json then in error + .catch((error) => { + //console.log("error") + console.error(error); + return error; + }); +} + + + +export default getaccountactivateresponse; \ No newline at end of file diff --git a/UI/src/App.js b/UI/src/App.js index 7568cf9..2a09bed 100644 --- a/UI/src/App.js +++ b/UI/src/App.js @@ -2,6 +2,7 @@ import React from 'react'; import LoginForm from './forms/LoginForm'; import LandingForm from './forms/LandingForm'; import PasswordChange from './forms/PasswordChange'; +import AccountActivate from './forms/AccountActivate'; import RegistrationForm from './forms/RegistrationForm'; import CreateBadgeForm from './forms/CreateBadgeForm'; @@ -24,6 +25,7 @@ const App = () => { + } /> {/* }/> */} diff --git a/UI/src/forms/AccountActivate.js b/UI/src/forms/AccountActivate.js new file mode 100644 index 0000000..4ac4a9d --- /dev/null +++ b/UI/src/forms/AccountActivate.js @@ -0,0 +1,169 @@ +import React, { useState } from 'react'; +import getaccountactivateresponse from '../API/AccountActivateAPI' +import Avatar from '@material-ui/core/Avatar'; +import Button from '@material-ui/core/Button'; +import CssBaseline from '@material-ui/core/CssBaseline'; +import TextField from '@material-ui/core/TextField'; +import Grid from '@material-ui/core/Grid'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; +import Container from '@material-ui/core/Container'; +import ManageAccountsSharpIcon from '@mui/icons-material/ManageAccountsSharp'; +import LoginForm from './LoginForm'; + + +const AccountActivate = (props) => { + + + const [useremail, setuseremail] = useState(''); + const [activationcode, setactivationcode] = useState(''); + const [useractivationresponse, setuseractivationresponse] = useState(''); + var userredirectmessage = ""; + + + + +const handleactivationcode = event => { + setactivationcode(event.target.value); + +}; + +const handleemail = event => { + setuseremail(event.target.value); + +}; + + +const handleActivateAccount = async () => { + + if(activationcode==''||useremail=='') + { + setuseractivationresponse('Please fill all mandatory fields'); + } + else{ + var response = new Promise((resolve, reject) => { + resolve(getaccountactivateresponse(useremail,activationcode)); + }).then(value => { + // setPassword(''); + setuseractivationresponse(value); + console.log(useractivationresponse) + + + }); + + } + +} + + + +const useStyles = makeStyles((theme) => ({ + paper: { + marginTop: theme.spacing(8), + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + }, + avatar: { + margin: theme.spacing(1), + backgroundColor: theme.palette.secondary.main, + }, + form: { + width: '100%', // Fix IE 11 issue. + marginTop: theme.spacing(3), + }, + submit: { + margin: theme.spacing(3, 0, 2), + }, +})); + + + + +const classes = useStyles(); + +if (useractivationresponse == 'You have now been activated. Please go ahead and login') { + return ( +
+ + +
+ ); +} +else { + return ( + + +
+ + + + Activate your account +

+ + + + + + + + + + + + + {/* */} + + + + + + + + +
+
+ ); +} + + +} + +export default AccountActivate; \ No newline at end of file diff --git a/UI/src/forms/PasswordChange.js b/UI/src/forms/PasswordChange.js index fda618a..2bd9ed2 100644 --- a/UI/src/forms/PasswordChange.js +++ b/UI/src/forms/PasswordChange.js @@ -9,6 +9,7 @@ import LockOutlinedIcon from '@material-ui/icons/LockOutlined'; import Typography from '@material-ui/core/Typography'; import { makeStyles } from '@material-ui/core/styles'; import Container from '@material-ui/core/Container'; +import LoginForm from './LoginForm'; const PasswordChange = (props) => { @@ -91,91 +92,102 @@ const useStyles = makeStyles((theme) => ({ const classes = useStyles(); -return ( - - -
- - - - Reset Password -

- - - - - - - - - - +if (passwordResetResponse == 'Password reset is complete') { + return ( +
+ + +
+ ); +} +else { + return ( + + +
+ + + + Reset Password +

+ - - - - - - - -
-
- ); + +
+ + + + + + + + + + + + + + +
+
+ ); + +} diff --git a/UI/src/forms/RegistrationForm.js b/UI/src/forms/RegistrationForm.js index 12d92ea..62c5ea2 100644 --- a/UI/src/forms/RegistrationForm.js +++ b/UI/src/forms/RegistrationForm.js @@ -121,7 +121,7 @@ const RegistrationForm = () => { if (response == 'registered') { return (
- +
); From 8bfca72aadf033f9c93df4e6c5b8eea7a901a9b2 Mon Sep 17 00:00:00 2001 From: Nupur582 Date: Thu, 18 Nov 2021 20:25:47 -0600 Subject: [PATCH 20/21] confirm user all changes done from Backend and the UI. ready to merge. --- Backend/backend_variable.env | 2 +- Backend/registration.py | 2 +- UI/package-lock.json | 517 ++++++++++++++++++++++++++++------ UI/package.json | 6 +- UI/src/API/ActivateUserAPI.js | 35 --- 5 files changed, 439 insertions(+), 123 deletions(-) delete mode 100644 UI/src/API/ActivateUserAPI.js diff --git a/Backend/backend_variable.env b/Backend/backend_variable.env index f6732e0..6d7a65a 100644 --- a/Backend/backend_variable.env +++ b/Backend/backend_variable.env @@ -4,7 +4,7 @@ DEBUG = True MAIL_SERVER = 'smtp.office365.com' MAIL_PORT = 587 MAIL_USERNAME = No-replyBadge@cscportal.onmicrosoft.com -MAIL_PASSWORD = Industri@lizeD@11162021 +MAIL_PASSWORD = P@noply@123 MAIL_USE_TLS = True MAIL_USE_SSL = True diff --git a/Backend/registration.py b/Backend/registration.py index 4b76ce6..b51b43d 100644 --- a/Backend/registration.py +++ b/Backend/registration.py @@ -115,7 +115,7 @@ def email_confirmation(email_address,body): message = """\

Please click on the link below to activate your email

- Click here to activate your email + Click here to activate your email """ msg_text = MIMEText('%s' % (body+ message), 'html') msg.attach(msg_text) diff --git a/UI/package-lock.json b/UI/package-lock.json index df66ab6..0b986d6 100644 --- a/UI/package-lock.json +++ b/UI/package-lock.json @@ -1274,11 +1274,155 @@ "resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-10.1.0.tgz", "integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==" }, + "@emotion/babel-plugin": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.3.0.tgz", + "integrity": "sha512-UZKwBV2rADuhRp+ZOGgNWg2eYgbzKzQXfQPtJbu/PLy8onurxlNCLvxMQEvlr1/GudguPI5IU9qIY1+2z1M5bA==", + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/runtime": "^7.13.10", + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.5", + "@emotion/serialize": "^1.0.2", + "babel-plugin-macros": "^2.6.1", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "^4.0.3" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + } + } + }, + "@emotion/cache": { + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.6.0.tgz", + "integrity": "sha512-ElbsWY1KMwEowkv42vGo0UPuLgtPYfIs9BxxVrmvsaJVvktknsHYYlx5NQ5g6zLDcOTyamlDc7FkRg2TAcQDKQ==", + "requires": { + "@emotion/memoize": "^0.7.4", + "@emotion/sheet": "^1.1.0", + "@emotion/utils": "^1.0.0", + "@emotion/weak-memoize": "^0.2.5", + "stylis": "^4.0.10" + } + }, "@emotion/hash": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" }, + "@emotion/is-prop-valid": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.1.1.tgz", + "integrity": "sha512-bW1Tos67CZkOURLc0OalnfxtSXQJMrAMV0jZTVGJUPSOd4qgjF3+tTD5CwJM13PHA8cltGW1WGbbvV9NpvUZPw==", + "requires": { + "@emotion/memoize": "^0.7.4" + } + }, + "@emotion/memoize": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", + "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==" + }, + "@emotion/react": { + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.6.0.tgz", + "integrity": "sha512-23MnRZFBN9+D1lHXC5pD6z4X9yhPxxtHr6f+iTGz6Fv6Rda0GdefPrsHL7otsEf+//7uqCdT5QtHeRxHCERzuw==", + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/cache": "^11.6.0", + "@emotion/serialize": "^1.0.2", + "@emotion/sheet": "^1.1.0", + "@emotion/utils": "^1.0.0", + "@emotion/weak-memoize": "^0.2.5", + "hoist-non-react-statics": "^3.3.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@emotion/serialize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.0.2.tgz", + "integrity": "sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A==", + "requires": { + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.4", + "@emotion/unitless": "^0.7.5", + "@emotion/utils": "^1.0.0", + "csstype": "^3.0.2" + }, + "dependencies": { + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" + } + } + }, + "@emotion/sheet": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.1.0.tgz", + "integrity": "sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g==" + }, + "@emotion/styled": { + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.6.0.tgz", + "integrity": "sha512-mxVtVyIOTmCAkFbwIp+nCjTXJNgcz4VWkOYQro87jE2QBTydnkiYusMrRGFtzuruiGK4dDaNORk4gH049iiQuw==", + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/babel-plugin": "^11.3.0", + "@emotion/is-prop-valid": "^1.1.1", + "@emotion/serialize": "^1.0.2", + "@emotion/utils": "^1.0.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" + }, + "@emotion/utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.0.0.tgz", + "integrity": "sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA==" + }, + "@emotion/weak-memoize": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz", + "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" + }, "@eslint/eslintrc": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", @@ -1913,14 +2057,14 @@ } }, "@material-ui/core": { - "version": "4.11.3", - "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.11.3.tgz", - "integrity": "sha512-Adt40rGW6Uds+cAyk3pVgcErpzU/qxc7KBR94jFHBYretU4AtWZltYcNsbeMn9tXL86jjVL1kuGcIHsgLgFGRw==", + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.12.3.tgz", + "integrity": "sha512-sdpgI/PL56QVsEJldwEe4FFaFTLUqN+rd7sSZiRCdx2E/C7z5yK0y/khAWVBH24tXwto7I1hCzNWfJGZIYJKnw==", "requires": { "@babel/runtime": "^7.4.4", - "@material-ui/styles": "^4.11.3", - "@material-ui/system": "^4.11.3", - "@material-ui/types": "^5.1.0", + "@material-ui/styles": "^4.11.4", + "@material-ui/system": "^4.12.1", + "@material-ui/types": "5.1.0", "@material-ui/utils": "^4.11.2", "@types/react-transition-group": "^4.2.0", "clsx": "^1.0.4", @@ -1940,13 +2084,13 @@ } }, "@material-ui/styles": { - "version": "4.11.3", - "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.3.tgz", - "integrity": "sha512-HzVzCG+PpgUGMUYEJ2rTEmQYeonGh41BYfILNFb/1ueqma+p1meSdu4RX6NjxYBMhf7k+jgfHFTTz+L1SXL/Zg==", + "version": "4.11.4", + "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.4.tgz", + "integrity": "sha512-KNTIZcnj/zprG5LW0Sao7zw+yG3O35pviHzejMdcSGCdWbiO8qzRgOYL8JAxAsWBKOKYwVZxXtHWaB5T2Kvxew==", "requires": { "@babel/runtime": "^7.4.4", "@emotion/hash": "^0.8.0", - "@material-ui/types": "^5.1.0", + "@material-ui/types": "5.1.0", "@material-ui/utils": "^4.11.2", "clsx": "^1.0.4", "csstype": "^2.5.2", @@ -1963,9 +2107,9 @@ } }, "@material-ui/system": { - "version": "4.11.3", - "resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.11.3.tgz", - "integrity": "sha512-SY7otguNGol41Mu2Sg6KbBP1ZRFIbFLHGK81y4KYbsV2yIcaEPOmsCK6zwWlp+2yTV3J/VwT6oSBARtGIVdXPw==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.12.1.tgz", + "integrity": "sha512-lUdzs4q9kEXZGhbN7BptyiS1rLNHe6kG9o8Y307HCvF4sQxbCgpL2qi+gUk+yI8a2DNk48gISEQxoxpgph0xIw==", "requires": { "@babel/runtime": "^7.4.4", "@material-ui/utils": "^4.11.2", @@ -1988,6 +2132,194 @@ "react-is": "^16.8.0 || ^17.0.0" } }, + "@mui/base": { + "version": "5.0.0-alpha.55", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.55.tgz", + "integrity": "sha512-caPa04xwZF5Gv7qkto32xRBwubNgkjbXQngqp8PN10DQ/XcLtoe4PqrSPjwWBH0iNUZSRDf2HPP71tIU7bdR7Q==", + "requires": { + "@babel/runtime": "^7.16.3", + "@emotion/is-prop-valid": "^1.1.1", + "@mui/utils": "^5.1.1", + "@popperjs/core": "^2.4.4", + "clsx": "^1.1.1", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } + }, + "@mui/icons-material": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.1.1.tgz", + "integrity": "sha512-tLM1/QhVAgcetEscZa8BlM1IRRaoNxjhFzQOIs5wAuuVhHSrB8zZCKugpZVIZ1nKyQqLgVEa9TbtWpo5jLrnRQ==", + "requires": { + "@babel/runtime": "^7.16.3" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@mui/material": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.1.1.tgz", + "integrity": "sha512-3mhuKlWnTa1r5cJ8mV66NXXmOB6Ck564oq4X8Ai0CeHqj0f6xCBHOgWXQtX6Cc8Yhf81MJkaN92AECVUpUHqLQ==", + "requires": { + "@babel/runtime": "^7.16.3", + "@mui/base": "5.0.0-alpha.55", + "@mui/system": "^5.1.1", + "@mui/types": "^7.1.0", + "@mui/utils": "^5.1.1", + "@types/react-transition-group": "^4.4.4", + "clsx": "^1.1.1", + "csstype": "^3.0.9", + "hoist-non-react-statics": "^3.3.2", + "prop-types": "^15.7.2", + "react-is": "^17.0.2", + "react-transition-group": "^4.4.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } + }, + "@mui/private-theming": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.1.1.tgz", + "integrity": "sha512-h+MGzBVSH7GgXou4aIraJhakygTYIWvvxvTm81Y6RmwRcrzv8szDQeRDiM7iOVjqsS33dXfMkTi7csRCgeErsg==", + "requires": { + "@babel/runtime": "^7.16.3", + "@mui/utils": "^5.1.1", + "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@mui/styled-engine": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.1.1.tgz", + "integrity": "sha512-vThhmTezPjBcn6CEeVuFqB3wgANnxHgYXn0wsr+OIgevkgSHeRfVn6mpSa66oTFGb+paPtH4ASqeUvL5Sscg4w==", + "requires": { + "@babel/runtime": "^7.16.3", + "@emotion/cache": "^11.6.0", + "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@mui/system": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.1.1.tgz", + "integrity": "sha512-RWaM/7wAvSOX39r13in3KrLXWsd0cSkk1P/MOCW2eVY13MJIAuDUl5ZoF1uos9kWWJJge+lE77XWmYqXYrxPLw==", + "requires": { + "@babel/runtime": "^7.16.3", + "@mui/private-theming": "^5.1.1", + "@mui/styled-engine": "^5.1.1", + "@mui/types": "^7.1.0", + "@mui/utils": "^5.1.1", + "clsx": "^1.1.1", + "csstype": "^3.0.9", + "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" + } + } + }, + "@mui/types": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.1.0.tgz", + "integrity": "sha512-Hh7ALdq/GjfIwLvqH3XftuY3bcKhupktTm+S6qRIDGOtPtRuq2L21VWzOK4p7kblirK0XgGVH5BLwa6u8z/6QQ==" + }, + "@mui/utils": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.1.1.tgz", + "integrity": "sha512-rqakHf0IMaasDo1EcYqkx13VTxeoQoGf/3RxQuazQFKzF7d2uylFwNyb6bnUJGNe2/akiIMk/qiub58sYrwxVQ==", + "requires": { + "@babel/runtime": "^7.16.3", + "@types/prop-types": "^15.7.4", + "@types/react-is": "^16.7.1 || ^17.0.0", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2066,6 +2398,11 @@ } } }, + "@popperjs/core": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.10.2.tgz", + "integrity": "sha512-IXf3XA7+XyN7CP9gGh/XB0UxVMlvARGEgGXLubFICsUMGz6Q+DU+i4gGlpOxTjKvXjkJDJC8YdqdKkDj9qZHEQ==" + }, "@rollup/plugin-node-resolve": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", @@ -2571,9 +2908,9 @@ "integrity": "sha512-Fo79ojj3vdEZOHg3wR9ksAMRz4P3S5fDB5e/YWZiFnyFQI1WY2Vftu9XoXVVtJfxB7Bpce/QTqWSSntkz2Znrw==" }, "@types/prop-types": { - "version": "15.7.3", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz", - "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==" + "version": "15.7.4", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", + "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" }, "@types/q": { "version": "1.5.5", @@ -2581,25 +2918,34 @@ "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==" }, "@types/react": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.0.tgz", - "integrity": "sha512-aj/L7RIMsRlWML3YB6KZiXB3fV2t41+5RBGYF8z+tAKU43Px8C3cYUZsDvf1/+Bm4FK21QWBrDutu8ZJ/70qOw==", + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.35.tgz", + "integrity": "sha512-r3C8/TJuri/SLZiiwwxQoLAoavaczARfT9up9b4Jr65+ErAUX3MIkU0oMOQnrpfgHme8zIqZLX7O5nnjm5Wayw==", "requires": { "@types/prop-types": "*", + "@types/scheduler": "*", "csstype": "^3.0.2" }, "dependencies": { "csstype": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.6.tgz", - "integrity": "sha512-+ZAmfyWMT7TiIlzdqJgjMb7S4f1beorDbWbsocyK4RaiqA5RTX3K14bnBWmmA9QEM0gRdsjyyrEmcyga8Zsxmw==" + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" } } }, + "@types/react-is": { + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-17.0.3.tgz", + "integrity": "sha512-aBTIWg1emtu95bLTLx0cpkxwGW3ueZv71nE2YFBpL8k/z5czEW8yYpOo8Dp+UUAFAtKwNaOsh/ioSeQnWlZcfw==", + "requires": { + "@types/react": "*" + } + }, "@types/react-transition-group": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz", - "integrity": "sha512-/QfLHGpu+2fQOqQaXh8MG9q03bFENooTb/it4jr5kKaZlDQfWvjqWZg48AwzPVMBHlRuTRAY7hRHCEOXz5kV6w==", + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", + "integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==", "requires": { "@types/react": "*" } @@ -2612,6 +2958,11 @@ "@types/node": "*" } }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, "@types/source-list-map": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", @@ -5122,9 +5473,9 @@ } }, "csstype": { - "version": "2.6.14", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.14.tgz", - "integrity": "sha512-2mSc+VEpGPblzAxyeR+vZhJKgYg0Og0nnRi7pmRXFYYxSfnOnW8A5wwQb4n4cE2nIOzqKOAzLCaEX6aBmNEv8A==" + "version": "2.6.19", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.19.tgz", + "integrity": "sha512-ZVxXaNy28/k3kJg0Fou5MiYpp88j7H9hLZp8PDC3jV0WFjfH5E9xHb56L0W59cPbKbcHXeP4qyT8PrHp8t6LcQ==" }, "cyclist": { "version": "1.0.1", @@ -5456,18 +5807,18 @@ } }, "dom-helpers": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.0.tgz", - "integrity": "sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", "requires": { "@babel/runtime": "^7.8.7", "csstype": "^3.0.2" }, "dependencies": { "csstype": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.6.tgz", - "integrity": "sha512-+ZAmfyWMT7TiIlzdqJgjMb7S4f1beorDbWbsocyK4RaiqA5RTX3K14bnBWmmA9QEM0gRdsjyyrEmcyga8Zsxmw==" + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" } } }, @@ -6949,6 +7300,11 @@ "pkg-dir": "^3.0.0" } }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -7946,14 +8302,6 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, - "indefinite-observable": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/indefinite-observable/-/indefinite-observable-2.0.1.tgz", - "integrity": "sha512-G8vgmork+6H9S8lUAg1gtXEj2JxIQTo0g2PbFiYOdjkziSI0F7UYBiVwhZRuixhBCNGczAls34+5HJPyZysvxQ==", - "requires": { - "symbol-observable": "1.2.0" - } - }, "indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", @@ -10065,89 +10413,88 @@ } }, "jss": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss/-/jss-10.5.1.tgz", - "integrity": "sha512-hbbO3+FOTqVdd7ZUoTiwpHzKXIo5vGpMNbuXH1a0wubRSWLWSBvwvaq4CiHH/U42CmjOnp6lVNNs/l+Z7ZdDmg==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jss/-/jss-10.8.2.tgz", + "integrity": "sha512-FkoUNxI329CKQ9OQC8L72MBF9KPf5q8mIupAJ5twU7G7XREW7ahb+7jFfrjZ4iy1qvhx1HwIWUIvkZBDnKkEdQ==", "requires": { "@babel/runtime": "^7.3.1", "csstype": "^3.0.2", - "indefinite-observable": "^2.0.1", "is-in-browser": "^1.1.3", "tiny-warning": "^1.0.2" }, "dependencies": { "csstype": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.6.tgz", - "integrity": "sha512-+ZAmfyWMT7TiIlzdqJgjMb7S4f1beorDbWbsocyK4RaiqA5RTX3K14bnBWmmA9QEM0gRdsjyyrEmcyga8Zsxmw==" + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" } } }, "jss-plugin-camel-case": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.5.1.tgz", - "integrity": "sha512-9+oymA7wPtswm+zxVti1qiowC5q7bRdCJNORtns2JUj/QHp2QPXYwSNRD8+D2Cy3/CEMtdJzlNnt5aXmpS6NAg==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.8.2.tgz", + "integrity": "sha512-2INyxR+1UdNuKf4v9It3tNfPvf7IPrtkiwzofeKuMd5D58/dxDJVUQYRVg/n460rTlHUfsEQx43hDrcxi9dSPA==", "requires": { "@babel/runtime": "^7.3.1", "hyphenate-style-name": "^1.0.3", - "jss": "10.5.1" + "jss": "10.8.2" } }, "jss-plugin-default-unit": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.5.1.tgz", - "integrity": "sha512-D48hJBc9Tj3PusvlillHW8Fz0y/QqA7MNmTYDQaSB/7mTrCZjt7AVRROExoOHEtd2qIYKOYJW3Jc2agnvsXRlQ==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.8.2.tgz", + "integrity": "sha512-UZ7cwT9NFYSG+SEy7noRU50s4zifulFdjkUNKE+u6mW7vFP960+RglWjTgMfh79G6OENZmaYnjHV/gcKV4nSxg==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1" + "jss": "10.8.2" } }, "jss-plugin-global": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.5.1.tgz", - "integrity": "sha512-jX4XpNgoaB8yPWw/gA1aPXJEoX0LNpvsROPvxlnYe+SE0JOhuvF7mA6dCkgpXBxfTWKJsno7cDSCgzHTocRjCQ==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.8.2.tgz", + "integrity": "sha512-UaYMSPsYZ7s/ECGoj4KoHC2jwQd5iQ7K+FFGnCAILdQrv7hPmvM2Ydg45ThT/sH46DqktCRV2SqjRuxeBH8nRA==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1" + "jss": "10.8.2" } }, "jss-plugin-nested": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.5.1.tgz", - "integrity": "sha512-xXkWKOCljuwHNjSYcXrCxBnjd8eJp90KVFW1rlhvKKRXnEKVD6vdKXYezk2a89uKAHckSvBvBoDGsfZrldWqqQ==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.8.2.tgz", + "integrity": "sha512-acRvuPJOb930fuYmhkJaa994EADpt8TxI63Iyg96C8FJ9T2xRyU5T6R1IYKRwUiqZo+2Sr7fdGzRTDD4uBZaMA==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1", + "jss": "10.8.2", "tiny-warning": "^1.0.2" } }, "jss-plugin-props-sort": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.5.1.tgz", - "integrity": "sha512-t+2vcevNmMg4U/jAuxlfjKt46D/jHzCPEjsjLRj/J56CvP7Iy03scsUP58Iw8mVnaV36xAUZH2CmAmAdo8994g==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.8.2.tgz", + "integrity": "sha512-wqdcjayKRWBZnNpLUrXvsWqh+5J5YToAQ+8HNBNw0kZxVvCDwzhK2Nx6AKs7p+5/MbAh2PLgNW5Ym/ysbVAuqQ==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1" + "jss": "10.8.2" } }, "jss-plugin-rule-value-function": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.5.1.tgz", - "integrity": "sha512-3gjrSxsy4ka/lGQsTDY8oYYtkt2esBvQiceGBB4PykXxHoGRz14tbCK31Zc6DHEnIeqsjMUGbq+wEly5UViStQ==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.8.2.tgz", + "integrity": "sha512-bW0EKAs+0HXpb6BKJhrn94IDdiWb0CnSluTkh0rGEgyzY/nmD1uV/Wf6KGlesGOZ9gmJzQy+9FFdxIUID1c9Ug==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1", + "jss": "10.8.2", "tiny-warning": "^1.0.2" } }, "jss-plugin-vendor-prefixer": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.5.1.tgz", - "integrity": "sha512-cLkH6RaPZWHa1TqSfd2vszNNgxT1W0omlSjAd6hCFHp3KIocSrW21gaHjlMU26JpTHwkc+tJTCQOmE/O1A4FKQ==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.8.2.tgz", + "integrity": "sha512-DeGv18QsSiYLSVIEB2+l0af6OToUe0JB+trpzUxyqD2QRC/5AzzDrCrYffO5AHZ81QbffYvSN/pkfZaTWpRXlg==", "requires": { "@babel/runtime": "^7.3.1", "css-vendor": "^2.0.8", - "jss": "10.5.1" + "jss": "10.8.2" } }, "jsx-ast-utils": { @@ -13154,9 +13501,9 @@ } }, "react-transition-group": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz", - "integrity": "sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", + "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==", "requires": { "@babel/runtime": "^7.5.5", "dom-helpers": "^5.0.1", @@ -14927,6 +15274,11 @@ } } }, + "stylis": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.10.tgz", + "integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -14984,11 +15336,6 @@ "util.promisify": "~1.0.0" } }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" - }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", diff --git a/UI/package.json b/UI/package.json index 6a1a324..7d493ce 100644 --- a/UI/package.json +++ b/UI/package.json @@ -3,8 +3,12 @@ "version": "0.1.0", "private": true, "dependencies": { - "@material-ui/core": "^4.11.0", + "@emotion/react": "^11.6.0", + "@emotion/styled": "^11.6.0", + "@material-ui/core": "^4.12.3", "@material-ui/icons": "^4.9.1", + "@mui/icons-material": "^5.1.1", + "@mui/material": "^5.1.1", "@testing-library/dom": "^7.26.0", "@testing-library/jest-dom": "^5.11.9", "@testing-library/react": "^11.2.5", diff --git a/UI/src/API/ActivateUserAPI.js b/UI/src/API/ActivateUserAPI.js deleted file mode 100644 index 891f39a..0000000 --- a/UI/src/API/ActivateUserAPI.js +++ /dev/null @@ -1,35 +0,0 @@ -const getactivateResponse = async(email, confirmationCode) => { - - var url = process.env.REACT_APP_APILINK+'/activate'; - return await fetch(url, { - method: 'POST', - body: JSON.stringify({email: email, - confirmationCode:confirmationCode, - }), - headers: { - 'Accept':'application/json', - 'Content-Type':'application/json' - } - }) - .then((response) => response.text()) - // If response is in json then in success - .then((responseText) => { - //Success - // alert(JSON.stringify(responseJson)); - //console.log("in here") - console.log(responseText); - return responseText; - }) - //If response is not in json then in error - .catch((error) => { - //Error - // alert(JSON.stringify(error)); - console.log("error") - console.error(error); - return error; - }); -} - - - -export default getactivateResponse; \ No newline at end of file From eb46b58483e9b108815443b69d090c621c209781 Mon Sep 17 00:00:00 2001 From: Nupur582 <55519481+Nupur582@users.noreply.github.com> Date: Tue, 23 Nov 2021 11:41:25 -0600 Subject: [PATCH 21/21] Update backend_variable.env --- Backend/backend_variable.env | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Backend/backend_variable.env b/Backend/backend_variable.env index 6d7a65a..bcfb582 100644 --- a/Backend/backend_variable.env +++ b/Backend/backend_variable.env @@ -3,12 +3,12 @@ DEBUG = True MAIL_SERVER = 'smtp.office365.com' MAIL_PORT = 587 -MAIL_USERNAME = No-replyBadge@cscportal.onmicrosoft.com -MAIL_PASSWORD = P@noply@123 +MAIL_USERNAME = +MAIL_PASSWORD = MAIL_USE_TLS = True MAIL_USE_SSL = True # DATABASE VARIABLES DB_NAME = Panoply -DB_CONNECTION_STRING = 'mongodb+srv://dbuser:admin123@panoplycluster0.ssmov.mongodb.net/Panoply?retryWrites=true&w=majority' \ No newline at end of file +DB_CONNECTION_STRING = 'mongodb+srv://dbuser:admin123@panoplycluster0.ssmov.mongodb.net/Panoply?retryWrites=true&w=majority'