Node.js based forum software built for the modern web
fix: improper SSO format (regression), update openapi schema
Julian Lamdf65c60081e5
diff --git a/public/openapi/components/schemas/UserObject.yaml b/public/openapi/components/schemas/UserObject.yamlindex d10acf63bc..c2b3177637 100644--- a/public/openapi/components/schemas/UserObject.yaml+++ b/public/openapi/components/schemas/UserObject.yaml@@ -512,21 +512,6 @@ UserObjectFull:- name- visibility- public- sso:- type: array- items:- type: object- properties:- associated:- type: boolean- url:- type: string- name:- type: string- icon:- type: string- deauthUrl:- type: stringwebsiteLink:type: stringwebsiteName:diff --git a/public/openapi/read/user/userslug/edit.yaml b/public/openapi/read/user/userslug/edit.yamlindex 734ea32abf..8ba486b5e8 100644--- a/public/openapi/read/user/userslug/edit.yaml+++ b/public/openapi/read/user/userslug/edit.yaml@@ -47,6 +47,21 @@ get:type: numberdefaultAvatar:type: string+ sso:+ type: array+ items:+ type: object+ properties:+ associated:+ type: boolean+ url:+ type: string+ name:+ type: string+ icon:+ type: string+ deauthUrl:+ type: stringgroupSelectSize:type: numbertitle:diff --git a/src/controllers/accounts/edit.js b/src/controllers/accounts/edit.jsindex 9b6526ad80..8560f043e8 100644--- a/src/controllers/accounts/edit.js+++ b/src/controllers/accounts/edit.js@@ -41,7 +41,8 @@ editController.get = async function (req, res) {payload.groups = _groups.filter(g => g && g.userTitleEnabled && !groups.isPrivilegeGroup(g.name) && g.name !== 'registered-users');if (req.uid === res.locals.uid || canManageUsers) {- payload.sso = await plugins.hooks.fire('filter:auth.list', { uid: res.locals.uid, associations: [] });+ const { associations } = await plugins.hooks.fire('filter:auth.list', { uid: res.locals.uid, associations: [] });+ payload.sso = associations;}if (!allowMultipleBadges) {