@@ -45,10 +45,10 @@ import { NrcsIngestCacheType } from '@sofie-automation/corelib/dist/dataModel/Nr
45
45
import { verifyHashedToken } from './singleUseTokens'
46
46
import { QuickLoopMarker } from '@sofie-automation/corelib/dist/dataModel/RundownPlaylist'
47
47
import { runIngestOperation } from './ingest/lib'
48
- import { RundownPlaylistContentWriteAccess } from '../security/rundownPlaylist'
49
48
import { IngestJobs } from '@sofie-automation/corelib/dist/worker/ingest'
50
49
import { UserPermissions } from '@sofie-automation/meteor-lib/dist/userPermissions'
51
50
import { assertConnectionHasOneOfPermissions } from '../security/auth'
51
+ import { checkAccessToRundown } from '../security/check'
52
52
53
53
const PERMISSIONS_FOR_PLAYOUT_USERACTION : Array < keyof UserPermissions > = [ 'studio' ]
54
54
const PERMISSIONS_FOR_BUCKET_MODIFICATION : Array < keyof UserPermissions > = [ 'studio' ]
@@ -1315,11 +1315,10 @@ class ServerUserActionAPI
1315
1315
'executeUserChangeOperation' ,
1316
1316
{ operationTarget, operation } ,
1317
1317
async ( ) => {
1318
- const access = await RundownPlaylistContentWriteAccess . rundown ( this , rundownId )
1319
- if ( ! access . rundown ) throw new Error ( `Rundown "${ rundownId } " not found` )
1318
+ const rundown = await checkAccessToRundown ( this . connection , rundownId )
1320
1319
1321
- await runIngestOperation ( access . rundown . studioId , IngestJobs . UserExecuteChangeOperation , {
1322
- rundownExternalId : access . rundown . externalId ,
1320
+ await runIngestOperation ( rundown . studioId , IngestJobs . UserExecuteChangeOperation , {
1321
+ rundownExternalId : rundown . externalId ,
1323
1322
operationTarget,
1324
1323
operation,
1325
1324
} )
0 commit comments