diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-07 17:18:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-08 08:41:48 +0200 |
commit | d4d9bbc6f24522f5d63b0ab105a02f80ca98d702 (patch) | |
tree | 9e7e5e5170cea36a489f6c988df892a34c886937 /server/controllers/api/accounts.ts | |
parent | 8b69f9f02879ee3cf72bc9d4aa96cc71f18e6eea (diff) | |
download | PeerTube-d4d9bbc6f24522f5d63b0ab105a02f80ca98d702.tar.gz PeerTube-d4d9bbc6f24522f5d63b0ab105a02f80ca98d702.tar.zst PeerTube-d4d9bbc6f24522f5d63b0ab105a02f80ca98d702.zip |
Fix channel sync right check
Diffstat (limited to 'server/controllers/api/accounts.ts')
-rw-r--r-- | server/controllers/api/accounts.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts index 7a530cde5..2d86d393c 100644 --- a/server/controllers/api/accounts.ts +++ b/server/controllers/api/accounts.ts | |||
@@ -3,6 +3,7 @@ import { pickCommonVideoQuery } from '@server/helpers/query' | |||
3 | import { ActorFollowModel } from '@server/models/actor/actor-follow' | 3 | import { ActorFollowModel } from '@server/models/actor/actor-follow' |
4 | import { getServerActor } from '@server/models/application/application' | 4 | import { getServerActor } from '@server/models/application/application' |
5 | import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils' | 5 | import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils' |
6 | import { VideoChannelSyncModel } from '@server/models/video/video-channel-sync' | ||
6 | import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils' | 7 | import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils' |
7 | import { getFormattedObjects } from '../../helpers/utils' | 8 | import { getFormattedObjects } from '../../helpers/utils' |
8 | import { JobQueue } from '../../lib/job-queue' | 9 | import { JobQueue } from '../../lib/job-queue' |
@@ -25,7 +26,7 @@ import { | |||
25 | accountsFollowersSortValidator, | 26 | accountsFollowersSortValidator, |
26 | accountsSortValidator, | 27 | accountsSortValidator, |
27 | ensureAuthUserOwnsAccountValidator, | 28 | ensureAuthUserOwnsAccountValidator, |
28 | ensureCanManageUser, | 29 | ensureCanManageChannelOrAccount, |
29 | videoChannelsSortValidator, | 30 | videoChannelsSortValidator, |
30 | videoChannelStatsValidator, | 31 | videoChannelStatsValidator, |
31 | videoChannelSyncsSortValidator, | 32 | videoChannelSyncsSortValidator, |
@@ -37,7 +38,6 @@ import { AccountVideoRateModel } from '../../models/account/account-video-rate' | |||
37 | import { VideoModel } from '../../models/video/video' | 38 | import { VideoModel } from '../../models/video/video' |
38 | import { VideoChannelModel } from '../../models/video/video-channel' | 39 | import { VideoChannelModel } from '../../models/video/video-channel' |
39 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | 40 | import { VideoPlaylistModel } from '../../models/video/video-playlist' |
40 | import { VideoChannelSyncModel } from '@server/models/video/video-channel-sync' | ||
41 | 41 | ||
42 | const accountsRouter = express.Router() | 42 | const accountsRouter = express.Router() |
43 | 43 | ||
@@ -78,7 +78,7 @@ accountsRouter.get('/:accountName/video-channels', | |||
78 | accountsRouter.get('/:accountName/video-channel-syncs', | 78 | accountsRouter.get('/:accountName/video-channel-syncs', |
79 | authenticate, | 79 | authenticate, |
80 | asyncMiddleware(accountNameWithHostGetValidator), | 80 | asyncMiddleware(accountNameWithHostGetValidator), |
81 | ensureCanManageUser, | 81 | ensureCanManageChannelOrAccount, |
82 | paginationValidator, | 82 | paginationValidator, |
83 | videoChannelSyncsSortValidator, | 83 | videoChannelSyncsSortValidator, |
84 | setDefaultSort, | 84 | setDefaultSort, |