fix: return empty array for 'sso' otherwise

isekai-main
Julian Lam 1 year ago
parent a6c98de631
commit db15e7c4b1

@ -40,6 +40,7 @@ editController.get = async function (req, res) {
payload.groups = _groups.filter(g => g && g.userTitleEnabled && !groups.isPrivilegeGroup(g.name) && g.name !== 'registered-users'); payload.groups = _groups.filter(g => g && g.userTitleEnabled && !groups.isPrivilegeGroup(g.name) && g.name !== 'registered-users');
payload.sso = [];
if (req.uid === res.locals.uid || canManageUsers) { if (req.uid === res.locals.uid || canManageUsers) {
payload.sso = await plugins.hooks.fire('filter:auth.list', { uid: res.locals.uid, associations: [] }); payload.sso = await plugins.hooks.fire('filter:auth.list', { uid: res.locals.uid, associations: [] });
} }

Loading…
Cancel
Save