Skip to content
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

Hotfix/0.18.2 (develop) #677

Merged
merged 2 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v0.18.1](https://github.com/isomerpages/isomercms-backend/compare/v0.18.0...v0.18.1)
#### [v0.18.2](https://github.com/isomerpages/isomercms-backend/compare/v0.18.1...v0.18.2)

- fix(review): return 200 for unmigrated sites [`bd69c29`](https://github.com/isomerpages/isomercms-backend/commit/bd69c29023554c5dcf8cb361227ba4ebf0d1ac08)
- fix(sanitize): use same setup for dompurify as FE [`c25f448`](https://github.com/isomerpages/isomercms-backend/commit/c25f448813e1addce67d0209375ec35ef9cb6c7b)
- Fix: change response for github users accessing collaborator endpoints [`db1130f`](https://github.com/isomerpages/isomercms-backend/commit/db1130f96a6c9cda99df43d5774134aefffeee3e)

#### [v0.18.1](https://github.com/isomerpages/isomercms-backend/compare/v0.18.0...v0.18.1)

> 31 March 2023

- fix(review): return 200 for unmigrated sites [`073cab8`](https://github.com/isomerpages/isomercms-backend/commit/073cab8c6704178ee5061b8582b4f999720dfc95)

#### [v0.18.0](https://github.com/isomerpages/isomercms-backend/compare/v0.17.0...v0.18.0)

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "isomercms",
"version": "0.18.1",
"version": "0.18.2",
"private": true,
"scripts": {
"build": "tsc -p tsconfig.build.json",
Expand Down
6 changes: 4 additions & 2 deletions src/middleware/authorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export class AuthorizationMiddleware {
autoBind(this)
}

// Check whether a user is using email login or github login
// Allows access only to users using email login
// If using Github login, immediately returns 200 response instead
verifyIsEmailUser: RequestHandler<
never,
unknown,
Expand All @@ -29,7 +30,8 @@ export class AuthorizationMiddleware {
{ userWithSiteSessionData: UserWithSiteSessionData }
> = async (req, res, next) => {
const { userWithSiteSessionData } = res.locals
if (!userWithSiteSessionData.isEmailUser()) return next("router")
if (!userWithSiteSessionData.isEmailUser())
return res.status(200).send("OK")
return next()
}

Expand Down