Ejemplo n.º 1
0
        public bool IsBuiltInAdministrator(IWindowsUserInfo userInfo)
        {
            // WARNING: When making any changes to this function, please make sure that it works correctly when the process is run on IIS with the "ApplicationPoolIdentity".

            if (!userInfo.IsUserRecognized)
            {
                return(false);
            }

            WindowsPrincipal principal = new WindowsPrincipal(userInfo.WindowsIdentity);

            // Returns true if user is a local administrator AND the process is running under elevated privileges.
            return(principal.IsInRole(WindowsBuiltInRole.Administrator));
        }
Ejemplo n.º 2
0
        public bool IsBuiltInAdministrator(IWindowsUserInfo userInfo)
        {
            // WARNING: When making any changes to this function, please make sure that it works correctly when the process is run on IIS with the "ApplicationPoolIdentity".

            if (!userInfo.IsUserRecognized)
                return false;

            WindowsPrincipal principal = new WindowsPrincipal(userInfo.WindowsIdentity);

            // Returns true if user is a local administrator AND the process is running under elevated privileges.
            return principal.IsInRole(WindowsBuiltInRole.Administrator);
        }
Ejemplo n.º 3
0
 public bool IsBuiltInAdministrator(IWindowsUserInfo userInfo)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 4
0
 public bool IsBuiltInAdministrator(IWindowsUserInfo userInfo)
 {
     throw new NotImplementedException();
 }