mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #19863 from overleaf/jpa-log-noise-pro
[web] gracefully handle missing "getUserGroupsSSOEnrollmentStatus" hook GitOrigin-RevId: 3e37a9caf4ccc54ec89c9a274bd4a55c503a3f43
This commit is contained in:
parent
d5643d53b3
commit
de842c61c3
1 changed files with 9 additions and 8 deletions
|
@ -115,14 +115,15 @@ async function settingsPage(req, res) {
|
||||||
|
|
||||||
let memberOfSSOEnabledGroups = []
|
let memberOfSSOEnabledGroups = []
|
||||||
try {
|
try {
|
||||||
memberOfSSOEnabledGroups = (
|
memberOfSSOEnabledGroups =
|
||||||
|
(
|
||||||
await Modules.promises.hooks.fire(
|
await Modules.promises.hooks.fire(
|
||||||
'getUserGroupsSSOEnrollmentStatus',
|
'getUserGroupsSSOEnrollmentStatus',
|
||||||
user._id,
|
user._id,
|
||||||
{ teamName: 1 },
|
{ teamName: 1 },
|
||||||
['email']
|
['email']
|
||||||
)
|
)
|
||||||
)?.[0]
|
)?.[0] || []
|
||||||
memberOfSSOEnabledGroups = memberOfSSOEnabledGroups.map(group => {
|
memberOfSSOEnabledGroups = memberOfSSOEnabledGroups.map(group => {
|
||||||
return {
|
return {
|
||||||
groupId: group._id.toString(),
|
groupId: group._id.toString(),
|
||||||
|
|
Loading…
Reference in a new issue