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/video-channel.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/video-channel.ts')
-rw-r--r-- | server/controllers/api/video-channel.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index 94285a78d..d7c92952a 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts | |||
@@ -23,7 +23,7 @@ import { | |||
23 | asyncRetryTransactionMiddleware, | 23 | asyncRetryTransactionMiddleware, |
24 | authenticate, | 24 | authenticate, |
25 | commonVideosFiltersValidator, | 25 | commonVideosFiltersValidator, |
26 | ensureCanManageChannel, | 26 | ensureCanManageChannelOrAccount, |
27 | optionalAuthenticate, | 27 | optionalAuthenticate, |
28 | paginationValidator, | 28 | paginationValidator, |
29 | setDefaultPagination, | 29 | setDefaultPagination, |
@@ -77,7 +77,7 @@ videoChannelRouter.post('/:nameWithHost/avatar/pick', | |||
77 | reqAvatarFile, | 77 | reqAvatarFile, |
78 | asyncMiddleware(videoChannelsNameWithHostValidator), | 78 | asyncMiddleware(videoChannelsNameWithHostValidator), |
79 | ensureIsLocalChannel, | 79 | ensureIsLocalChannel, |
80 | ensureCanManageChannel, | 80 | ensureCanManageChannelOrAccount, |
81 | updateAvatarValidator, | 81 | updateAvatarValidator, |
82 | asyncMiddleware(updateVideoChannelAvatar) | 82 | asyncMiddleware(updateVideoChannelAvatar) |
83 | ) | 83 | ) |
@@ -87,7 +87,7 @@ videoChannelRouter.post('/:nameWithHost/banner/pick', | |||
87 | reqBannerFile, | 87 | reqBannerFile, |
88 | asyncMiddleware(videoChannelsNameWithHostValidator), | 88 | asyncMiddleware(videoChannelsNameWithHostValidator), |
89 | ensureIsLocalChannel, | 89 | ensureIsLocalChannel, |
90 | ensureCanManageChannel, | 90 | ensureCanManageChannelOrAccount, |
91 | updateBannerValidator, | 91 | updateBannerValidator, |
92 | asyncMiddleware(updateVideoChannelBanner) | 92 | asyncMiddleware(updateVideoChannelBanner) |
93 | ) | 93 | ) |
@@ -96,7 +96,7 @@ videoChannelRouter.delete('/:nameWithHost/avatar', | |||
96 | authenticate, | 96 | authenticate, |
97 | asyncMiddleware(videoChannelsNameWithHostValidator), | 97 | asyncMiddleware(videoChannelsNameWithHostValidator), |
98 | ensureIsLocalChannel, | 98 | ensureIsLocalChannel, |
99 | ensureCanManageChannel, | 99 | ensureCanManageChannelOrAccount, |
100 | asyncMiddleware(deleteVideoChannelAvatar) | 100 | asyncMiddleware(deleteVideoChannelAvatar) |
101 | ) | 101 | ) |
102 | 102 | ||
@@ -104,7 +104,7 @@ videoChannelRouter.delete('/:nameWithHost/banner', | |||
104 | authenticate, | 104 | authenticate, |
105 | asyncMiddleware(videoChannelsNameWithHostValidator), | 105 | asyncMiddleware(videoChannelsNameWithHostValidator), |
106 | ensureIsLocalChannel, | 106 | ensureIsLocalChannel, |
107 | ensureCanManageChannel, | 107 | ensureCanManageChannelOrAccount, |
108 | asyncMiddleware(deleteVideoChannelBanner) | 108 | asyncMiddleware(deleteVideoChannelBanner) |
109 | ) | 109 | ) |
110 | 110 | ||
@@ -112,7 +112,7 @@ videoChannelRouter.put('/:nameWithHost', | |||
112 | authenticate, | 112 | authenticate, |
113 | asyncMiddleware(videoChannelsNameWithHostValidator), | 113 | asyncMiddleware(videoChannelsNameWithHostValidator), |
114 | ensureIsLocalChannel, | 114 | ensureIsLocalChannel, |
115 | ensureCanManageChannel, | 115 | ensureCanManageChannelOrAccount, |
116 | videoChannelsUpdateValidator, | 116 | videoChannelsUpdateValidator, |
117 | asyncRetryTransactionMiddleware(updateVideoChannel) | 117 | asyncRetryTransactionMiddleware(updateVideoChannel) |
118 | ) | 118 | ) |
@@ -121,7 +121,7 @@ videoChannelRouter.delete('/:nameWithHost', | |||
121 | authenticate, | 121 | authenticate, |
122 | asyncMiddleware(videoChannelsNameWithHostValidator), | 122 | asyncMiddleware(videoChannelsNameWithHostValidator), |
123 | ensureIsLocalChannel, | 123 | ensureIsLocalChannel, |
124 | ensureCanManageChannel, | 124 | ensureCanManageChannelOrAccount, |
125 | asyncMiddleware(videoChannelsRemoveValidator), | 125 | asyncMiddleware(videoChannelsRemoveValidator), |
126 | asyncRetryTransactionMiddleware(removeVideoChannel) | 126 | asyncRetryTransactionMiddleware(removeVideoChannel) |
127 | ) | 127 | ) |
@@ -155,7 +155,7 @@ videoChannelRouter.get('/:nameWithHost/videos', | |||
155 | videoChannelRouter.get('/:nameWithHost/followers', | 155 | videoChannelRouter.get('/:nameWithHost/followers', |
156 | authenticate, | 156 | authenticate, |
157 | asyncMiddleware(videoChannelsNameWithHostValidator), | 157 | asyncMiddleware(videoChannelsNameWithHostValidator), |
158 | ensureCanManageChannel, | 158 | ensureCanManageChannelOrAccount, |
159 | paginationValidator, | 159 | paginationValidator, |
160 | videoChannelsFollowersSortValidator, | 160 | videoChannelsFollowersSortValidator, |
161 | setDefaultSort, | 161 | setDefaultSort, |
@@ -168,7 +168,7 @@ videoChannelRouter.post('/:nameWithHost/import-videos', | |||
168 | asyncMiddleware(videoChannelsNameWithHostValidator), | 168 | asyncMiddleware(videoChannelsNameWithHostValidator), |
169 | asyncMiddleware(videoChannelImportVideosValidator), | 169 | asyncMiddleware(videoChannelImportVideosValidator), |
170 | ensureIsLocalChannel, | 170 | ensureIsLocalChannel, |
171 | ensureCanManageChannel, | 171 | ensureCanManageChannelOrAccount, |
172 | asyncMiddleware(ensureChannelOwnerCanUpload), | 172 | asyncMiddleware(ensureChannelOwnerCanUpload), |
173 | asyncMiddleware(importVideosInChannel) | 173 | asyncMiddleware(importVideosInChannel) |
174 | ) | 174 | ) |