Skip to content

Commit 2addb10

Browse files
authored
Merge pull request #1381 from bbc/fix/meteor-allow-deny
fix(Core): simplify meteor collection auth checks
2 parents 9969b70 + 2277737 commit 2addb10

File tree

21 files changed

+37
-39
lines changed

21 files changed

+37
-39
lines changed

.github/actions/setup-meteor/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ description: "Setup Meteor"
33
runs:
44
using: "composite"
55
steps:
6-
- run: curl "https://install.meteor.com/?release=3.1" | sh
6+
- run: curl "https://install.meteor.com/?release=3.1.2" | sh
77
shell: bash

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.11
1+
22.13.1

meteor/.meteor/packages

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
# but you can also edit it by hand.
1010

11-
meteor@2.0.1
12-
11+
meteor@2.1.0
12+
1313
1414

15-
mongo@2.0.2 # The database Meteor supports right now
15+
mongo@2.1.0 # The database Meteor supports right now
1616

17-
[email protected].9 # Enable ECMAScript2015+ syntax in app code
18-
typescript@5.4.3 # Enable TypeScript syntax in .ts and .tsx modules
17+
[email protected].10 # Enable ECMAScript2015+ syntax in app code
18+
typescript@5.6.3 # Enable TypeScript syntax in .ts and .tsx modules
1919

2020
[email protected] # Meteor's client-side reactive programming library
2121

meteor/.meteor/release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1+

meteor/.meteor/versions

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
allow-deny@2.0.0
2-
1+
allow-deny@2.1.0
2+
33
44
55
@@ -8,9 +8,9 @@ [email protected]
88
99
1010
11-
ddp-client@3.0.3
11+
ddp-client@3.1.0
1212
13-
ddp-server@3.0.3
13+
ddp-server@3.1.0
1414
1515
1616
@@ -24,26 +24,26 @@ [email protected]
2424
2525
2626
27-
meteor@2.0.2
27+
meteor@2.1.0
2828
29-
modern-browsers@0.1.11
29+
modern-browsers@0.2.0
3030
3131
32-
mongo@2.0.3
32+
mongo@2.1.0
3333
3434
3535
36-
36+
3737
3838
3939
4040
4141
4242
4343
44-
socket-stream-client@0.5.3
44+
socket-stream-client@0.6.0
4545
4646
47-
47+
4848
4949

meteor/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN yarn install && yarn build
1515

1616
# BUILD IMAGE
1717
FROM node:22
18-
RUN curl "https://install.meteor.com/?release=3.1" | sh
18+
RUN curl "https://install.meteor.com/?release=3.1.2" | sh
1919

2020
# Temporary change the NODE_ENV env variable, so that all libraries are installed:
2121
ENV NODE_ENV_TMP $NODE_ENV

meteor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.53.0-in-development",
44
"private": true,
55
"engines": {
6-
"node": ">=22.11"
6+
"node": ">=22.13.1"
77
},
88
"scripts": {
99
"preinstall": "node -v",

meteor/server/collections/collection.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,10 @@ function setupCollectionAllowRules<DBInterface extends { _id: ProtectedString<an
112112

113113
const { /* insert: origInsert,*/ update: origUpdate /*remove: origRemove*/ } = args
114114

115-
// These methods behave weirdly, we need to mangle this a bit.
116-
// See https://github.com/meteor/meteor/issues/13444 for a full explanation
117-
const options: any /*Parameters<Mongo.Collection<DBInterface>['allow']>[0]*/ = {
118-
update: () => false,
119-
updateAsync: origUpdate
120-
? (userId: string | null, doc: DBInterface, fieldNames: string[], modifier: any) =>
121-
origUpdate(protectString(userId), doc, fieldNames as any, modifier) as any
115+
const options: Parameters<Mongo.Collection<DBInterface>['allow']>[0] = {
116+
update: origUpdate
117+
? async (userId: string | null, doc: DBInterface, fieldNames: string[], modifier: any) =>
118+
origUpdate(protectString(userId), doc, fieldNames as any, modifier)
122119
: () => false,
123120
}
124121

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "MIT",
55
"private": true,
66
"engines": {
7-
"node": ">=22.11"
7+
"node": ">=22.13.1"
88
},
99
"scripts": {
1010
"postinstall": "run install:packages && run install:meteor",

packages/blueprints-integration/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"license-validate": "run -T sofie-licensecheck"
3030
},
3131
"engines": {
32-
"node": ">=22.11"
32+
"node": ">=22.13.1"
3333
},
3434
"files": [
3535
"/dist",

0 commit comments

Comments
 (0)