Skip to content

Commit 4b20c2d

Browse files
committed
wip: add missing check
1 parent 6a38590 commit 4b20c2d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

meteor/server/api/showStyles.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ export async function reorderShowStyleVariant(
216216
})
217217
}
218218

219-
async function getCreateAdlibTestingRundownOptions(): Promise<CreateAdlibTestingRundownOption[]> {
219+
async function getCreateAdlibTestingRundownOptions(context: MethodContext): Promise<CreateAdlibTestingRundownOption[]> {
220+
assertConnectionHasOneOfPermissions(context.connection, 'studio')
221+
220222
const [studios, showStyleBases, showStyleVariants] = await Promise.all([
221223
Studios.findFetchAsync(
222224
{},
@@ -304,7 +306,7 @@ class ServerShowStylesAPI extends MethodContextAPI implements NewShowStylesAPI {
304306
}
305307

306308
async getCreateAdlibTestingRundownOptions() {
307-
return getCreateAdlibTestingRundownOptions()
309+
return getCreateAdlibTestingRundownOptions(this)
308310
}
309311
}
310312
registerClassToMeteorMethods(ShowStylesAPIMethods, ServerShowStylesAPI, false)

0 commit comments

Comments
 (0)