From 32e0f7fd26e2a8c933ec9d263533c5d300fb327e Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 6 Oct 2025 11:56:52 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Enhance=20documen?= =?UTF-8?q?tation=20for=20Test-Admin=20function=20with=20detailed=20descri?= =?UTF-8?q?ption=20and=20example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/functions/public/Test-Admin.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/functions/public/Test-Admin.ps1 b/src/functions/public/Test-Admin.ps1 index 90161e4..982bdf7 100644 --- a/src/functions/public/Test-Admin.ps1 +++ b/src/functions/public/Test-Admin.ps1 @@ -3,8 +3,14 @@ .SYNOPSIS Test if the current context is running as a specified role. + .DESCRIPTION + This function checks if the current user context has Administrator privileges on Windows or is root on Unix-based systems. + It returns $true if the user has the required privileges, otherwise $false. + .EXAMPLE + ```pwsh Test-Role + ``` Test if the current context is running as an Administrator. From 491b930c4da91ad0f21db656bd65e029af5aa8a4 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 6 Oct 2025 11:57:30 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Add=20Linter=20co?= =?UTF-8?q?nfiguration=20to=20PSModule=20workflow=20for=20enhanced=20valid?= =?UTF-8?q?ation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PSModule.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/PSModule.yml b/.github/PSModule.yml index cd0c099..b68e464 100644 --- a/.github/PSModule.yml +++ b/.github/PSModule.yml @@ -19,3 +19,12 @@ Test: # Build: # Docs: # Skip: true +Linter: + env: + VALIDATE_BIOME_FORMAT: false + VALIDATE_BIOME_LINT: false + VALIDATE_GITHUB_ACTIONS_ZIZMOR: false + VALIDATE_JSCPD: false + VALIDATE_JSON_PRETTIER: false + VALIDATE_MARKDOWN_PRETTIER: false + VALIDATE_YAML_PRETTIER: false From 3d8bf1078900e011ff3dab5fd6e3e6b98f6b5171 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 6 Oct 2025 13:52:59 +0200 Subject: [PATCH 3/3] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/functions/public/Test-Admin.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions/public/Test-Admin.ps1 b/src/functions/public/Test-Admin.ps1 index 982bdf7..abd2668 100644 --- a/src/functions/public/Test-Admin.ps1 +++ b/src/functions/public/Test-Admin.ps1 @@ -9,7 +9,7 @@ .EXAMPLE ```pwsh - Test-Role + Test-Admin ``` Test if the current context is running as an Administrator.