fix: improper SSO format (regression), update openapi schema

This commit is contained in:
Julian Lam
2023-08-21 15:38:41 -04:00
parent db15e7c4b1
commit 4a846803e8
3 changed files with 17 additions and 16 deletions

View File

@@ -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: string
websiteLink:
type: string
websiteName:

View File

@@ -47,6 +47,21 @@ get:
type: number
defaultAvatar:
type: string
sso:
type: array
items:
type: object
properties:
associated:
type: boolean
url:
type: string
name:
type: string
icon:
type: string
deauthUrl:
type: string
groupSelectSize:
type: number
title:

View File

@@ -42,7 +42,8 @@ editController.get = async function (req, res) {
payload.sso = [];
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) {