From 40346ead2b0b7afa475aef057d3673b6c7574b7a Mon Sep 17 00:00:00 2001 From: Wicklow <123956049+wickloww@users.noreply.github.com> Date: Thu, 29 Jun 2023 07:48:55 +0000 Subject: Feature/password protected videos (#5836) * Add server endpoints * Refactoring test suites * Update server and add openapi documentation * fix compliation and tests * upload/import password protected video on client * add server error code * Add video password to update resolver * add custom message when sharing pw protected video * improve confirm component * Add new alert in component * Add ability to watch protected video on client * Cannot have password protected replay privacy * Add migration * Add tests * update after review * Update check params tests * Add live videos test * Add more filter test * Update static file privacy test * Update object storage tests * Add test on feeds * Add missing word * Fix tests * Fix tests on live videos * add embed support on password protected videos * fix style * Correcting data leaks * Unable to add password protected privacy on replay * Updated code based on review comments * fix validator and command * Updated code based on review comments --- server/tests/client.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'server/tests/client.ts') diff --git a/server/tests/client.ts b/server/tests/client.ts index e84251561..68f3a1d14 100644 --- a/server/tests/client.ts +++ b/server/tests/client.ts @@ -56,6 +56,7 @@ describe('Test a client controllers', function () { let privateVideoId: string let internalVideoId: string let unlistedVideoId: string + let passwordProtectedVideoId: string let playlistIds: (string | number)[] = [] @@ -92,7 +93,12 @@ describe('Test a client controllers', function () { { ({ uuid: privateVideoId } = await servers[0].videos.quickUpload({ name: 'private', privacy: VideoPrivacy.PRIVATE })); ({ uuid: unlistedVideoId } = await servers[0].videos.quickUpload({ name: 'unlisted', privacy: VideoPrivacy.UNLISTED })); - ({ uuid: internalVideoId } = await servers[0].videos.quickUpload({ name: 'internal', privacy: VideoPrivacy.INTERNAL })) + ({ uuid: internalVideoId } = await servers[0].videos.quickUpload({ name: 'internal', privacy: VideoPrivacy.INTERNAL })); + ({ uuid: passwordProtectedVideoId } = await servers[0].videos.quickUpload({ + name: 'password protected', + privacy: VideoPrivacy.PASSWORD_PROTECTED, + videoPasswords: [ 'password' ] + })) } // Playlist @@ -502,9 +508,9 @@ describe('Test a client controllers', function () { } }) - it('Should not display internal/private video', async function () { + it('Should not display internal/private/password protected video', async function () { for (const basePath of watchVideoBasePaths) { - for (const id of [ privateVideoId, internalVideoId ]) { + for (const id of [ privateVideoId, internalVideoId, passwordProtectedVideoId ]) { const res = await makeGetRequest({ url: servers[0].url, path: basePath + id, @@ -514,6 +520,7 @@ describe('Test a client controllers', function () { expect(res.text).to.not.contain('internal') expect(res.text).to.not.contain('private') + expect(res.text).to.not.contain('password protected') } } }) -- cgit v1.2.3