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 = []
|
||||
try {
|
||||
memberOfSSOEnabledGroups = (
|
||||
await Modules.promises.hooks.fire(
|
||||
'getUserGroupsSSOEnrollmentStatus',
|
||||
user._id,
|
||||
{ teamName: 1 },
|
||||
['email']
|
||||
)
|
||||
)?.[0]
|
||||
memberOfSSOEnabledGroups =
|
||||
(
|
||||
await Modules.promises.hooks.fire(
|
||||
'getUserGroupsSSOEnrollmentStatus',
|
||||
user._id,
|
||||
{ teamName: 1 },
|
||||
['email']
|
||||
)
|
||||
)?.[0] || []
|
||||
memberOfSSOEnabledGroups = memberOfSSOEnabledGroups.map(group => {
|
||||
return {
|
||||
groupId: group._id.toString(),
|
||||
|
|
Loading…
Reference in a new issue