-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: [master] Merge release 4.33.0 #296
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: Release 4.30.3 - Typescript migrations, filter storage mode responses by submission id
Release 4.30.4 - revert filtering by submission ID
Release v4.31.0 - improve docs, log IP, fix tests
…d reporting and repo badge (#185) * chore(deps): install coveralls * feat(readme): add coveralls badge to readme * feat(coveralls): configure jest to collect test coverage info and report it to coveralls.io * fix(jest): only collect coverage from TS files, bump threshold to 14% * fix(jest): restore test coverage behavior This reverts commit e2909d8.
feat: Release v4.32.0
chore: merge Release v4.32.0 into develop branch
…el (#203) * feat: Support sharing of form secret keys across browser tabs using BroadcastChannel * Add documentation about security and browser compatibility to BroadcastChannel
Bumps [sinon](https://github.com/sinonjs/sinon) from 6.3.5 to 9.0.3. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](sinonjs/sinon@v6.3.5...v9.0.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: add initial avatar-dropdown component to navbar * feat: show user profile dropdown when avatar is clicked or hovered * style: add avatar styling * feat: add on-click-outside directive * feat: open dropdown on focus or hover * feat: remove logout from navbar * style: add initial styling to navbar avatar * feat: add user details to dropdown * feat: add emergency contact UI if no contact in user * feat: add alert icon to avatar if contact is not set * feat: show contact number and edit number list item if number exists * feat: add EditContactNumberModal controller * feat: open initial edit contact number modal on edit click * feat: replace avatar in admin form navbar with AvatarDropdownComponent * feat: add initial EditContactNumberModal view * feat: add stronger regex for international number parsing * feat: add initial logic to display verification block on verify number * feat: add initial edit-contact-number-modal view * style: add initial styling for edit contact number modal * feat: add UI for verifying mobile number * feat: add otp verification success UI * feat: rip out all emergency verification ui Might be too much engineering effort to verify users, since the current verification collection is too intrinsically tied to the forms collection * fix: user schema validation to resolve with false instead of rejecting If the promise is rejected, it will resolve with the given error instead of the message. Resolving with false will correctly return the validation message. * feat(UserModel): add unique key violation hook to throw error * feat(UserModel): add `contact` key in user schema Used to store emergency contact numbers of the admin * test(UserModel): add schema tests for user mongoose model * Revert "feat: rip out all emergency verification ui" This reverts commit 0df2fe0. * feat: update copy and style modal to not be full screen * feat: open edit contact modal on login if user contact is missing * style: fix alignment of verify otp block * feat: AuthController now returns user contact in the return object * test: update e2e tests to default to a user with contact number so the emergency contact popup will not get triggered for the tests that have nothing to do with it. * style: add mobile styling * refactor: remove scss files * feat: add Emergency Contact feature backend (#151) * feat: add initial AdminVerification schema * feat(UserService): add initial interface * feat(UserController): add initial interface * feat: add and use initial UserRouter and UserRules for /user endpoint * refactor: move config.otpGenerator to utils/otp#generateOtp * feat(AdminVerification): add static `upsertOtp` method * feat(UserService): flesh out and use createContactOtp function * refactor: add `smsType` as SmsCount discriminator key This change is needed as we have more than 1 type of Sms to log now. We only used to have Verification SMSes to log, but now we also want to log admin emergency contact number SMSes. No other code changes are required, since the schema saved object shape has not changed. * refactor: rename OtpData typing to FormOtpData This is to accomodate different types of OTP data incoming to the application * feat(SmsCount): add AdminContactSmsCountSchema as discriminator * feat(SmsService): add sendAdminContactOtp function * feat(UserController): send generated OTP to emergency number * feat: store hash of contact in the DB instead of contact in plaintext * feat(AdminVerification): add both created and updated timestamps * feat(AdminVerification): add static method incrementAttemptsByAdminId * feat: add core ApplicationError for express app * feat: add UserError classes * feat(UserService): flesh out verifyContactOtp method * feat(UserController): use UserService#verifyContactOtp * feat: flesh out UserService#updateUserContact * feat: add error handling when updating user * refactor(AdminVerification): use exported user schema id constant * fix(AdminVerification): set defaults and reset otp attempts on upsert * feat: add clearCollection helper method to dbHandler * test(UserService): add tests * fix(AdminVerification): run validators on upsert in upsertOtp function * chore: update verifyContactOtp comment * test(helpers): add jest-express helper to create mock req/res * test(UserController): add tests * test(AdminVerification): add schema and statics tests * feat: use mongoose-unique-validator plugin for duplicate validation * refactor: convert user model validation to async function * refactor: export adminverification types from index * Revert "feat: use mongoose-unique-validator plugin for duplicate validation" This reverts commit 98aaa45. Done due to Typescript transpilation to Javascript making the package thrown some errors, weirdly enough. * refactor: use const instead of var Co-authored-by: Antariksh Mahajan <antarikshmahajan@gmail.com> * feat: add hover/focus differentiator on dropdown open state * fix(MailService): fix flaky test due to autocreated submission date * feat: integrate front and backends for Emergency Contact (#164) * feat: call sendotp and verifyotp endpoints to update contact * feat(UserService): return updated user object on contact update * feat(User): add GET /user endpoint to retrieve current session user * feat(EditContactModal): show success toast after updating user * feat: update user in localstorage on update success * feat: add Auth#refreshUser to retrieve user details from backend * feat: reload user from backend on avatar-dropdown component init * feat(UserController): add route guards against unauthorized users * test(UserController): update tests to check for session guards * test(UserController): add handleFetchUser tests * test(UserService): add getPopulatedUserById tests * feat: hide contact section in dropdown if sms feature is disabled * feat: move opening of emergency contact modal to avatar dropdown * fix: cancel resend countdown on modal close * feat: update emergency modal and avatar dropdown copy * fix: remove accidental import * docs: add tracking issue number to comment * test: update tests to use mock instead of spyon * test(UserController): update tests to check service invocation args * test(AdminVerificationModel): update an expect assertion * chore: add comments for UserController and AdminVerificationModel * chore: speed up jest tests on Travis See: https://jestjs.io/docs/en/troubleshooting#tests-are-extremely-slow-on-docker-andor-continuous-integration-ci-server * chore: speed up jest tests on Travis attempt 2 Reducing maxWorkers to 2 since the free open source version only has 2 cores Co-authored-by: Antariksh Mahajan <antarikshmahajan@gmail.com>
* chore: fix eslint not working on frontend code * lint: fix lint on the frontend
* feat: update application logger to enforce a logging format * feat: update all logger calls to the new enforced signature * feat: add stack trace into prod logs * fix: remove wrongly negated check for logging * feat(logger): add greater clarity to what errorHunter does * refactor(request): remove redundant req.get check * test(AdminFormController): add dummy req.get function not used in the test, but getRequestIp for logging uses it * Merge branch 'develop' into feat/standardize-logger # Conflicts: # src/app/controllers/authentication.server.controller.js # src/app/services/webhooks.service.ts
Bumps [eslint](https://github.com/eslint/eslint) from 6.8.0 to 7.7.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](eslint/eslint@v6.8.0...v7.7.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [opossum](https://github.com/nodeshift/opossum) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/nodeshift/opossum/releases) - [Changelog](https://github.com/nodeshift/opossum/blob/master/CHANGELOG.md) - [Commits](nodeshift/opossum@v5.0.0...v5.0.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fix: Hotfix v4.32.1 -- split mail by semicolon in addition to comma when validating
feat: merge release v4.32.1 back into develop branch
* feat: Bulk download of storage mode attachments in a zip file * Switch fetch to and unify download and decrypt code path to Submissions controller * Remove extraneous import * Fix off-by-one error in questionCount * feat(filename): have filename start with RefNo instead of Response * fix lint errors Co-authored-by: liangyuanruo <liangyuanruo@gmail.com>
Bumps [@types/mongoose](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mongoose) from 5.7.25 to 5.7.36. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mongoose) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.20.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) - [Commits](axios/axios@v0.19.2...v0.20.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor: convert MailTo to service * feat: pass toast options to updateFormStatusAndSave * style: add line break after form url * feat: allow skip linky * feat: add mailto url in long toastr * style: make url blue * chore: lint * feat: use translations
* Typify custom errors * Typify permission levels * Move errors to their own files * Update file paths * Update WebhookValidationError to be extended from ApplicationError * Update ConflictError to extend from ApplicationError * JSDoc the custom errors * Fix rebase errors Co-authored-by: Arshad Ali <arshadali@Arshads-MacBook-Pro.local>
Bumps [validator](https://github.com/chriso/validator.js) from 11.1.0 to 13.1.1. - [Release notes](https://github.com/chriso/validator.js/releases) - [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md) - [Commits](validatorjs/validator.js@11.1.0...13.1.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor: allow Buffer in file-validation types * refactor: add attachment response type * refactor: migrate attachment util to typescript * refactor: shift bcrypt types to dev deps * fix: update BasicField enum * test: test attachmentsAreValid * refactor: pass responses array instead of whole req * test: test everything else * refactor: remove unused zip files * refactor: use it instead of test * refactor: replace array access with assignment * refactor: use should for all tests * refactor: use async/await instead of .resolves
Bumps [@types/helmet](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/helmet) from 0.0.47 to 0.0.48. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/helmet) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor: rename sns module to bounce * refactor: use router for bounce routes * refactor: use router for vfn routes * refactor: avoid default exports * refactor: use it instead of test * refactor: export on declaration * fix: use message instead of error * refactor: use segments * refactor: change all test wording to should * refactor: add newline after each block * refactor: capitalise imports * refactor: use clearAllMocks * test: add params in mockRequest * test: use expressHandler for req and res * fix: use messages instead of message * refactor: swap joi function order and use message * chore: change it back to test Co-authored-by: Kar Rui Lau <karrui.lau@gmail.com> * refactor: export on declaration Co-authored-by: Kar Rui Lau <karrui.lau@gmail.com>
* fix(deps): bump http-status-codes from 1.4.0 to 2.1.2 Bumps [http-status-codes](https://github.com/prettymuchbryce/node-http-status) from 1.4.0 to 2.1.2. - [Release notes](https://github.com/prettymuchbryce/node-http-status/releases) - [Commits](prettymuchbryce/http-status-codes@v1.4.0...2.1.2) Signed-off-by: dependabot[bot] <support@github.com> * refactor: import StatusCodes from http-status-codes Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Antariksh Mahajan <antarikshmahajan@gmail.com>
* refactor: rename bounceInfo to bounceDoc * feat: log bounce info in critical bounce notification
…age mode form (#240) * style: fix margins of warning messagebox when typing in storage ack * feat(VerifySecretKeyModal): remove unneeded class
feat: Release 4.33.0
tshuli
approved these changes
Sep 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.