From d4d9bbc6f24522f5d63b0ab105a02f80ca98d702 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Sep 2022 17:18:29 +0200 Subject: Fix channel sync right check --- server/controllers/api/video-channel-sync.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/controllers/api/video-channel-sync.ts') diff --git a/server/controllers/api/video-channel-sync.ts b/server/controllers/api/video-channel-sync.ts index c2770b8e4..03c54b59c 100644 --- a/server/controllers/api/video-channel-sync.ts +++ b/server/controllers/api/video-channel-sync.ts @@ -5,7 +5,7 @@ import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, - ensureCanManageChannel as ensureCanManageSyncedChannel, + ensureCanManageChannelOrAccount, ensureSyncExists, ensureSyncIsEnabled, videoChannelSyncValidator @@ -21,14 +21,14 @@ videoChannelSyncRouter.post('/', authenticate, ensureSyncIsEnabled, asyncMiddleware(videoChannelSyncValidator), - ensureCanManageSyncedChannel, + ensureCanManageChannelOrAccount, asyncRetryTransactionMiddleware(createVideoChannelSync) ) videoChannelSyncRouter.delete('/:id', authenticate, asyncMiddleware(ensureSyncExists), - ensureCanManageSyncedChannel, + ensureCanManageChannelOrAccount, asyncRetryTransactionMiddleware(removeVideoChannelSync) ) -- cgit v1.2.3