mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-13 08:36:19 +00:00
Merge pull request #3112 from overleaf/ew-send-project-owner-id-to-tpds
add project_owner_user_id to tpds requests GitOrigin-RevId: 3b83d6dd2eaa00e100e7fa84e403318a44282747
This commit is contained in:
parent
6896f30f4f
commit
df32ea6dca
2 changed files with 9 additions and 3 deletions
|
@ -36,7 +36,8 @@ async function addEntity(options) {
|
|||
headers: {
|
||||
sl_entity_rev: options.rev,
|
||||
sl_project_id: options.project_id,
|
||||
sl_all_user_ids: JSON.stringify([userId])
|
||||
sl_all_user_ids: JSON.stringify([userId]),
|
||||
sl_project_owner_user_id: projectUserIds[0]
|
||||
},
|
||||
uri: buildTpdsUrl(userId, options.project_name, options.path),
|
||||
title: 'addFile',
|
||||
|
@ -86,7 +87,8 @@ async function deleteEntity(options) {
|
|||
method: 'delete',
|
||||
headers: {
|
||||
sl_project_id: options.project_id,
|
||||
sl_all_user_ids: JSON.stringify([userId])
|
||||
sl_all_user_ids: JSON.stringify([userId]),
|
||||
sl_project_owner_user_id: projectUserIds[0]
|
||||
},
|
||||
uri: buildTpdsUrl(userId, options.project_name, options.path),
|
||||
title: 'deleteEntity',
|
||||
|
@ -156,7 +158,8 @@ async function moveEntity(options) {
|
|||
headers: {
|
||||
sl_project_id: options.project_id,
|
||||
sl_entity_rev: options.rev,
|
||||
sl_all_user_ids: JSON.stringify([userId])
|
||||
sl_all_user_ids: JSON.stringify([userId]),
|
||||
sl_project_owner_user_id: projectUserIds[0]
|
||||
},
|
||||
json: {
|
||||
user_id: userId,
|
||||
|
|
|
@ -130,16 +130,19 @@ describe('TpdsUpdateSender', function() {
|
|||
)}${encodeURIComponent(path)}`
|
||||
job0.uri.should.equal(expectedUrl)
|
||||
job0.headers.sl_all_user_ids.should.equal(JSON.stringify([userId]))
|
||||
job0.headers.sl_project_owner_user_id.should.equal(userId)
|
||||
|
||||
const { group: group1, job: job1 } = this.request.secondCall.args[0].json
|
||||
group1.should.equal(collaberatorRef)
|
||||
job1.headers.sl_all_user_ids.should.equal(
|
||||
JSON.stringify([collaberatorRef])
|
||||
)
|
||||
job1.headers.sl_project_owner_user_id.should.equal(userId)
|
||||
|
||||
const { group: group2, job: job2 } = this.request.thirdCall.args[0].json
|
||||
group2.should.equal(readOnlyRef)
|
||||
job2.headers.sl_all_user_ids.should.equal(JSON.stringify([readOnlyRef]))
|
||||
job2.headers.sl_project_owner_user_id.should.equal(userId)
|
||||
|
||||
this.UserGetter.promises.getUsers.should.have.been.calledOnce.and.calledWith(
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue