From 4f54253a1ed663bcfe670c88978977ec3c8e78e8 Mon Sep 17 00:00:00 2001 From: Medha Tiwari <75640645+medhatiwari@users.noreply.github.com> Date: Tue, 28 Oct 2025 16:04:57 +0530 Subject: [PATCH] Update SkipIfNotAdminAttribute.cs --- .../Infrastructure/SkipIfNotAdminAttribute.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/SkipIfNotAdminAttribute.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/SkipIfNotAdminAttribute.cs index 189a0efd0d46..8721e39eacbe 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/SkipIfNotAdminAttribute.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/SkipIfNotAdminAttribute.cs @@ -14,6 +14,11 @@ public bool IsMet { get { + if (!OperatingSystem.IsWindows()) + { + return false; + } + var identity = WindowsIdentity.GetCurrent(); var principal = new WindowsPrincipal(identity); return principal.IsInRole(WindowsBuiltInRole.Administrator) || SkipInVSTSAttribute.RunningInVSTS;