mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #27894 from overleaf/ii-domain-capture-join-button
[web] Domain capture join button GitOrigin-RevId: aec6033f6776e9384c77fe0ef609c65b13a90f87
This commit is contained in:
@@ -333,13 +333,17 @@ const _ProjectController = {
|
||||
if (domainCaptureRedirect === 'enabled') {
|
||||
const subscription = (
|
||||
await Modules.promises.hooks.fire(
|
||||
'findDomainCaptureAndManagedUsersGroupUserShouldBePartOf',
|
||||
'findDomainCaptureGroupUserCouldBePartOf',
|
||||
userId
|
||||
)
|
||||
)?.[0]
|
||||
|
||||
if (subscription) {
|
||||
return res.redirect('/domain-capture')
|
||||
if (subscription.managedUsersEnabled) {
|
||||
return res.redirect('/domain-capture')
|
||||
} else {
|
||||
// TODO show notification or anything else
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,13 +124,17 @@ async function projectListPage(req, res, next) {
|
||||
if (domainCaptureRedirect === 'enabled') {
|
||||
const subscription = (
|
||||
await Modules.promises.hooks.fire(
|
||||
'findDomainCaptureAndManagedUsersGroupUserShouldBePartOf',
|
||||
'findDomainCaptureGroupUserCouldBePartOf',
|
||||
userId
|
||||
)
|
||||
)?.[0]
|
||||
|
||||
if (subscription) {
|
||||
return res.redirect('/domain-capture')
|
||||
if (subscription.managedUsersEnabled) {
|
||||
return res.redirect('/domain-capture')
|
||||
} else {
|
||||
// TODO show notification or anything else
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user