mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-29 03:23:56 +01:00
13 lines
255 B
Go
13 lines
255 B
Go
|
package util
|
||
|
|
||
|
import "golang.zx2c4.com/wireguard/windows/elevate"
|
||
|
|
||
|
// IsAdmin returns true if user has admin privileges
|
||
|
func IsAdmin() bool {
|
||
|
adminDesktop, err := elevate.IsAdminDesktop()
|
||
|
if err == nil && adminDesktop {
|
||
|
return true
|
||
|
}
|
||
|
return false
|
||
|
}
|