diff options
author | Chocobozzz <chocobozzz@framasoft.org> | 2020-06-11 10:36:04 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@framasoft.org> | 2020-06-11 10:36:04 +0200 |
commit | fa58a19819cb821a5c5a26802efd492461be9c04 (patch) | |
tree | 72bd8307da8ac447bb9934b1301ab0d93ea97e6b /server | |
parent | 50a04125dac1a126cb79a9fb575fcf673c5ac2d6 (diff) | |
parent | e95bede8fe660a38c99e51560caa5dd58a8eb23e (diff) | |
download | PeerTube-fa58a19819cb821a5c5a26802efd492461be9c04.tar.gz PeerTube-fa58a19819cb821a5c5a26802efd492461be9c04.tar.zst PeerTube-fa58a19819cb821a5c5a26802efd492461be9c04.zip |
Merge branch 'blacklist' into 'develop'
rename blacklist to block/blocklist, merge block and auto-block views
See merge request framasoft/peertube/PeerTube!30
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/video-blacklist.ts | 2 | ||||
-rw-r--r-- | server/tests/api/check-params/users.ts | 2 | ||||
-rw-r--r-- | server/tests/api/users/users.ts | 4 | ||||
-rw-r--r-- | server/tests/api/videos/video-blacklist.ts | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/video-blacklist.ts b/server/lib/video-blacklist.ts index bd60c6201..1ee92d22c 100644 --- a/server/lib/video-blacklist.ts +++ b/server/lib/video-blacklist.ts | |||
@@ -126,7 +126,7 @@ function autoBlacklistNeeded (parameters: { | |||
126 | if (!CONFIG.AUTO_BLACKLIST.VIDEOS.OF_USERS.ENABLED || !user) return false | 126 | if (!CONFIG.AUTO_BLACKLIST.VIDEOS.OF_USERS.ENABLED || !user) return false |
127 | if (isRemote || isNew === false) return false | 127 | if (isRemote || isNew === false) return false |
128 | 128 | ||
129 | if (user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) || user.hasAdminFlag(UserAdminFlag.BY_PASS_VIDEO_AUTO_BLACKLIST)) return false | 129 | if (user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) || user.hasAdminFlag(UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST)) return false |
130 | 130 | ||
131 | return true | 131 | return true |
132 | } | 132 | } |
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index 6e737af15..472fbda43 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -188,7 +188,7 @@ describe('Test users API validators', function () { | |||
188 | videoQuota: -1, | 188 | videoQuota: -1, |
189 | videoQuotaDaily: -1, | 189 | videoQuotaDaily: -1, |
190 | role: UserRole.USER, | 190 | role: UserRole.USER, |
191 | adminFlags: UserAdminFlag.BY_PASS_VIDEO_AUTO_BLACKLIST | 191 | adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST |
192 | } | 192 | } |
193 | 193 | ||
194 | it('Should fail with a too small username', async function () { | 194 | it('Should fail with a too small username', async function () { |
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index c0cbce360..cad954fcb 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -265,7 +265,7 @@ describe('Test users', function () { | |||
265 | username: user.username, | 265 | username: user.username, |
266 | password: user.password, | 266 | password: user.password, |
267 | videoQuota: 2 * 1024 * 1024, | 267 | videoQuota: 2 * 1024 * 1024, |
268 | adminFlags: UserAdminFlag.BY_PASS_VIDEO_AUTO_BLACKLIST | 268 | adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST |
269 | }) | 269 | }) |
270 | }) | 270 | }) |
271 | 271 | ||
@@ -292,7 +292,7 @@ describe('Test users', function () { | |||
292 | } | 292 | } |
293 | 293 | ||
294 | expect(userMe.adminFlags).to.be.undefined | 294 | expect(userMe.adminFlags).to.be.undefined |
295 | expect(userGet.adminFlags).to.equal(UserAdminFlag.BY_PASS_VIDEO_AUTO_BLACKLIST) | 295 | expect(userGet.adminFlags).to.equal(UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST) |
296 | 296 | ||
297 | expect(userMe.specialPlaylists).to.have.lengthOf(1) | 297 | expect(userMe.specialPlaylists).to.have.lengthOf(1) |
298 | expect(userMe.specialPlaylists[0].type).to.equal(VideoPlaylistType.WATCH_LATER) | 298 | expect(userMe.specialPlaylists[0].type).to.equal(VideoPlaylistType.WATCH_LATER) |
diff --git a/server/tests/api/videos/video-blacklist.ts b/server/tests/api/videos/video-blacklist.ts index 67bc0114c..a8500627b 100644 --- a/server/tests/api/videos/video-blacklist.ts +++ b/server/tests/api/videos/video-blacklist.ts | |||
@@ -396,7 +396,7 @@ describe('Test video blacklist', function () { | |||
396 | url: servers[0].url, | 396 | url: servers[0].url, |
397 | accessToken: servers[0].accessToken, | 397 | accessToken: servers[0].accessToken, |
398 | username: user.username, | 398 | username: user.username, |
399 | adminFlags: UserAdminFlag.BY_PASS_VIDEO_AUTO_BLACKLIST, | 399 | adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST, |
400 | password: user.password, | 400 | password: user.password, |
401 | role: UserRole.USER | 401 | role: UserRole.USER |
402 | }) | 402 | }) |