mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 23:30:10 +00:00
add refresh user permissions on sign in and sign up
This commit is contained in:
parent
dd0f1c0ec0
commit
ed595e66a4
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user