1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-03 21:10:05 +00:00

fix(web): system username for DESKTOP mode

This commit is contained in:
Saad Jutt
2022-05-30 21:08:17 +05:00
parent 73c81a45dc
commit a8ba378fd1
3 changed files with 23 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import { RequestHandler, Request } from 'express'
import { userInfo } from 'os'
import { RequestUser } from '../types'
import { ModeType } from '../utils'
@@ -29,8 +30,8 @@ export const desktopRestrict: RequestHandler = (req, res, next) => {
export const desktopUser: RequestUser = {
userId: 12345,
clientId: 'desktop_app',
username: 'DESKTOPusername',
displayName: 'DESKTOP User',
username: userInfo().username,
displayName: userInfo().username,
isAdmin: true,
isActive: true
}