mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
Server: Also clear admin session ID on logout after impersonating a user
This commit is contained in:
parent
8c9331cf61
commit
24945a0d3e
@ -11,6 +11,7 @@ const router = new Router(RouteType.Web);
|
||||
router.post('logout', async (_path: SubPath, ctx: AppContext) => {
|
||||
const sessionId = contextSessionId(ctx, false);
|
||||
cookieSet(ctx, 'sessionId', '');
|
||||
cookieSet(ctx, 'adminSessionId', '');
|
||||
await ctx.joplin.models.session().logout(sessionId);
|
||||
return redirect(ctx, `${config().baseUrl}/login`);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user