Link articlehistory to companyuser; store Google picture and sub on google_auth

This commit is contained in:
seb
2026-08-05 10:57:50 +02:00
parent 46c85fe29e
commit d1eb2716ae
12 changed files with 1284 additions and 1191 deletions

View File

@@ -271,6 +271,7 @@ const MENU = {
{ value: 'google_auth.listAllowedEmails', label: 'listAllowedEmails', hint: '→ rows' },
{ value: 'google_auth.removeAllowedEmail', label: 'removeAllowedEmail', hint: 'email' },
{ value: 'google_auth.setSelectedCompany', label: 'setSelectedCompany', hint: 'googleAuthId, companyId' },
{ value: 'google_auth.setProfile', label: 'setProfile', hint: 'googleAuthId, picture, sub' },
],
},
schema: {
@@ -1125,6 +1126,19 @@ async function runMethod(client, action) {
await client.google_auth.setSelectedCompany(Number(id), Number(companyId));
return ['ok', true];
}
case 'google_auth.setProfile': {
const id = await askInt('Auth id');
if (id == null) return;
const picture = await askText('picture URL', { placeholder: '(empty = null)' });
if (picture == null) return;
const sub = await askText('Google sub', { placeholder: '(empty = null)' });
if (sub == null) return;
await client.google_auth.setProfile(Number(id), {
picture: picture.trim() || null,
sub: sub.trim() || null,
});
return ['ok', true];
}
case 'initialize': {
await client.initialize();
return ['ok', true];