1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

All: Open the connection screen when a SAML session has expired

This commit is contained in:
Laurent Cozic
2025-10-29 13:41:32 +01:00
parent 42d8df3036
commit fc0014c0b5
3 changed files with 77 additions and 45 deletions

View File

@@ -2,6 +2,7 @@ import { utils, CommandRuntime, CommandDeclaration, CommandContext } from '../se
import { _ } from '../locale';
import { reg } from '../registry';
import Setting from '../models/Setting';
import NavService from '../services/NavService';
export const declaration: CommandDeclaration = {
name: 'synchronize',
@@ -35,7 +36,18 @@ export const runtime = (): CommandRuntime => {
return 'auth';
}
reg.logger().error('Not authenticated with sync target - please check your credentials.');
const error = new Error('Not authenticated with sync target - please check your credentials.');
utils.store.dispatch({
type: 'SYNC_REPORT_UPDATE',
report: { errors: [error] },
});
if (Setting.value('sync.target') === 11) {
await NavService.go('JoplinServerSamlLogin');
}
reg.logger().error(error);
return 'error';
}