mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-10 13:23:41 +00:00
Updated user-consent on linux to auto-fail when current uid is the gdm
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -283,6 +283,7 @@ function linux_messageBox()
|
||||
var ret = new promise(function (res, rej) { this._res = res; this._rej = rej; });
|
||||
var uid;
|
||||
var xinfo;
|
||||
var min = require('user-sessions').minUid();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -295,7 +296,7 @@ function linux_messageBox()
|
||||
xinfo = require('monitor-info').getXInfo(0);
|
||||
}
|
||||
|
||||
if (xinfo == null)
|
||||
if (xinfo == null || (uid != 0 && uid < min))
|
||||
{
|
||||
ret._rej('This system cannot display a user dialog box when a user is not logged in');
|
||||
return (ret);
|
||||
|
||||
Reference in New Issue
Block a user