aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/ui.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ui.go')
-rw-r--r--ui/ui.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 0279a8dd..569fc8ae 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT
*
- * Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
+ * Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved.
*/
package ui
@@ -20,9 +20,12 @@ import (
"golang.zx2c4.com/wireguard/windows/version"
)
-var noTrayAvailable = false
-var shouldQuitManagerWhenExiting = false
-var startTime = time.Now()
+var (
+ noTrayAvailable = false
+ shouldQuitManagerWhenExiting = false
+ startTime = time.Now()
+ IsAdmin = false // A global, because this really is global for the process
+)
func RunUI() {
runtime.LockOSThread()
@@ -72,7 +75,7 @@ func RunUI() {
switch updateState {
case manager.UpdateStateFoundUpdate:
mtw.UpdateFound()
- if tray != nil {
+ if tray != nil && IsAdmin {
tray.UpdateFound()
}
case manager.UpdateStateUpdatesDisabledUnofficialBuild: