From ed595e66a48681a9f8c9192d864fb0497dd2b4d0 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Fri, 10 Mar 2023 15:03:15 +0000 Subject: [PATCH] add refresh user permissions on sign in and sign up --- Identity/API/SSO.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Identity/API/SSO.ts b/Identity/API/SSO.ts index 41e2b9c2e7..d168d74dd0 100644 --- a/Identity/API/SSO.ts +++ b/Identity/API/SSO.ts @@ -25,6 +25,7 @@ import { DashboardRoute, Domain, HttpProtocol } from 'CommonServer/Config'; import Route from 'Common/Types/API/Route'; import TeamMember from 'Model/Models/TeamMember'; import TeamMemberService from 'CommonServer/Services/TeamMemberService'; +import AccessTokenService from 'CommonServer/Services/AccessTokenService'; const router: ExpressRouter = Express.getRouter(); @@ -398,6 +399,9 @@ router.post( OneUptimeDate.getSecondsInDays(new PositiveNumber(30)) ); + // Refresh Permissions for this user here. + await AccessTokenService.refreshUserAllPermissions(alreadySavedUser.id!); + return Response.redirect( req, res,