Skip to content

Commit 2fac520

Browse files
committed
fix: simplify meteor collection auth checks
This removes some deprecation warnings See meteor/meteor#13444
1 parent 55ffea8 commit 2fac520

File tree

5 files changed

+19
-21
lines changed

5 files changed

+19
-21
lines changed

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: 8 additions & 8 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,24 +24,24 @@ [email protected]
2424
2525
2626
27-
meteor@2.0.2
27+
meteor@2.1.0
2828
2929
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
4747

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

packages/webui/vite.config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export default defineConfig({
5555
},
5656

5757
server: {
58+
allowedHosts: true,
5859
proxy: {
5960
'/api': 'http://127.0.0.1:3000',
6061
'/site.webmanifest': 'http://127.0.0.1:3000',

0 commit comments

Comments
 (0)