mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-22 02:04:31 +00:00
Merge pull request #11621 from overleaf/jpa-targeted-access-check
[web] cut down volume of user content domain access check requests GitOrigin-RevId: 42011325db9f421e8267c4d0215701dedae652f9
This commit is contained in:
parent
c4ecded316
commit
635f2969ba
1 changed files with 16 additions and 8 deletions
|
@ -132,14 +132,22 @@ export async function checkUserContentDomainAccess() {
|
||||||
const userId = `0${randomHex(12).slice(1)}`
|
const userId = `0${randomHex(12).slice(1)}`
|
||||||
const buildId = genBuildId()
|
const buildId = genBuildId()
|
||||||
const zone = pickZone()
|
const zone = pickZone()
|
||||||
const urls = [
|
const urls = []
|
||||||
`${getMeta(
|
if (getMeta('ol-user_id')) {
|
||||||
'ol-compilesUserContentDomain'
|
// Logged-in user
|
||||||
)}/zone/${zone}/project/${projectId}/user/${userId}/build/${buildId}/output/output.pdf`,
|
urls.push(
|
||||||
`${getMeta(
|
`${getMeta(
|
||||||
'ol-compilesUserContentDomain'
|
'ol-compilesUserContentDomain'
|
||||||
)}/zone/${zone}/project/${projectId}/build/${buildId}/output/output.pdf`,
|
)}/zone/${zone}/project/${projectId}/user/${userId}/build/${buildId}/output/output.pdf`
|
||||||
]
|
)
|
||||||
|
} else {
|
||||||
|
// Anonymous user
|
||||||
|
urls.push(
|
||||||
|
`${getMeta(
|
||||||
|
'ol-compilesUserContentDomain'
|
||||||
|
)}/zone/${zone}/project/${projectId}/build/${buildId}/output/output.pdf`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const cases = []
|
const cases = []
|
||||||
for (const url of urls) {
|
for (const url of urls) {
|
||||||
|
|
Loading…
Reference in a new issue