isPrivilegedUser property

bool isPrivilegedUser

Returns true if the current user this process is running as has esclated privileges.

e.g. root under posix, Administrator under windows.

If you have called releasePrivileges then this method will return false unless you are within a privileged block create by withPrivileges.

You can check if the process was launched with priviliges via calling isPrivilegedProcess.

In Linux and MacOS terminology this method returns true if the effective uid is root (uid == 0).

Implementation

bool get isPrivilegedUser => false;