Fix external auth email/password update

Also check if an actor does not already exist when creating the user
This commit is contained in:
Chocobozzz
2020-05-20 10:04:44 +02:00
parent 51539e95d9
commit 9a7fd9600b
8 changed files with 32 additions and 8 deletions

View File

@@ -1044,7 +1044,7 @@ describe('Test users API validators', function () {
}
await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { targetUrl: getYoutubeVideoUrl() }))
await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { magnetUri: getMagnetURI() }))
await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { torrentfile: 'video-720p.torrent' }))
await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { torrentfile: 'video-720p.torrent' as any }))
await waitJobs([ server ])

View File

@@ -175,7 +175,7 @@ Ajouter un sous-titre est vraiment facile`)
{
const attributes = immutableAssign(baseAttributes, {
torrentfile: 'video-720p.torrent',
torrentfile: 'video-720p.torrent' as any,
description: 'this is a super torrent description',
tags: [ 'tag_torrent1', 'tag_torrent2' ]
})

View File

@@ -255,6 +255,16 @@ describe('Test external auth plugins', function () {
expect(body.role).to.equal(UserRole.USER)
})
it('Should not update an external auth email', async function () {
await updateMyUser({
url: server.url,
accessToken: cyanAccessToken,
email: 'toto@example.com',
currentPassword: 'toto',
statusCodeExpected: 400
})
})
it('Should reject token of Kefka by the plugin hook', async function () {
this.timeout(10000)