@contember/engine-http 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contember/engine-http",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/src/index.js",
6
6
  "typings": "dist/src/index.d.ts",
@@ -9,14 +9,14 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@apollographql/graphql-playground-html": "^1.6.24",
12
- "@contember/database": "^1.1.1",
13
- "@contember/engine-content-api": "^1.1.1",
14
- "@contember/engine-plugins": "^1.1.1",
15
- "@contember/engine-system-api": "^1.1.1",
16
- "@contember/engine-tenant-api": "^1.1.1",
17
- "@contember/graphql-utils": "^1.1.1",
18
- "@contember/schema": "^1.1.1",
19
- "@contember/schema-utils": "^1.1.1",
12
+ "@contember/database": "^1.1.3",
13
+ "@contember/engine-content-api": "^1.1.3",
14
+ "@contember/engine-plugins": "^1.1.3",
15
+ "@contember/engine-system-api": "^1.1.3",
16
+ "@contember/engine-tenant-api": "^1.1.3",
17
+ "@contember/graphql-utils": "^1.1.3",
18
+ "@contember/schema": "^1.1.3",
19
+ "@contember/schema-utils": "^1.1.3",
20
20
  "@graphql-tools/merge": "^6.2.14",
21
21
  "@graphql-tools/schema": "^8.3.5",
22
22
  "@types/lru-cache": "^5.1.0",
@@ -53,7 +53,7 @@ export class ContentApiMiddlewareFactory {
53
53
  request,
54
54
  timer,
55
55
  systemDatabase,
56
- stageSlug: stage.slug,
56
+ stageId: stage.id,
57
57
  })
58
58
  if (notModifiedRes?.isModified === false) {
59
59
  response.status = 304
@@ -39,7 +39,7 @@ export class ContentGraphQLContextFactory {
39
39
  let identityId = authResult.identityId
40
40
  if (
41
41
  authResult.assumedIdentityId &&
42
- Object.values(schema.acl.roles).find(it => it.system?.assumeIdentity)
42
+ memberships.some(it => schema.acl.roles[it.role].system?.assumeIdentity)
43
43
  ) {
44
44
  identityId = authResult.assumedIdentityId
45
45
  }
@@ -11,11 +11,11 @@ export interface NotModifiedCheckResult {
11
11
  }
12
12
 
13
13
  export class NotModifiedChecker {
14
- public async checkNotModified({ request, timer, systemDatabase, stageSlug }: {
14
+ public async checkNotModified({ request, timer, systemDatabase, stageId }: {
15
15
  request: Request
16
16
  timer: Timer
17
17
  systemDatabase: DatabaseContext
18
- stageSlug: string
18
+ stageId: string
19
19
  }): Promise<NotModifiedCheckResult | null> {
20
20
  if (request.headers[NotModifiedHeaderName] === undefined) {
21
21
  return null
@@ -28,7 +28,7 @@ export class NotModifiedChecker {
28
28
  }
29
29
  const latestRef = await timer('NotModifiedCheck', () => {
30
30
  const queryHandler = systemDatabase.queryHandler
31
- return queryHandler.fetch(new LatestTransactionIdByStageQuery(stageSlug))
31
+ return queryHandler.fetch(new LatestTransactionIdByStageQuery(stageId))
32
32
  })
33
33
 
34
34
  return {