Skip to content

Commit 334b95f

Browse files
author
rvdwegen
committed
put set-locations back
1 parent a42df97 commit 334b95f

File tree

6 files changed

+8
-0
lines changed

6 files changed

+8
-0
lines changed

Modules/CIPPCore/Public/Add-CIPPApplicationPermission.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function Add-CIPPApplicationPermission {
1111
}
1212
if ($RequiredResourceAccess -eq 'CIPPDefaults') {
1313

14+
Set-Location (Get-Item $PSScriptRoot).FullName
1415
$Permissions = Get-CippSamPermissions -NoDiff
1516
$RequiredResourceAccess = [System.Collections.Generic.List[object]]::new()
1617

Modules/CIPPCore/Public/Add-CIPPDelegatedPermission.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function Add-CIPPDelegatedPermission {
88
$TenantFilter
99
)
1010
Write-Host 'Adding Delegated Permissions'
11+
Set-Location (Get-Item $PSScriptRoot).FullName
1112

1213
if ($ApplicationId -eq $env:ApplicationID -and $TenantFilter -eq $env:TenantID) {
1314
#return @('Cannot modify delgated permissions for CIPP-SAM on partner tenant')

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Administration/Alerts/Invoke-PublicWebhooks.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function Invoke-PublicWebhooks {
88
param($Request, $TriggerMetadata)
99
$Headers = $Request.Headers
1010

11+
Set-Location (Get-Item $PSScriptRoot).Parent.FullName
1112
$WebhookTable = Get-CIPPTable -TableName webhookTable
1213
$WebhookIncoming = Get-CIPPTable -TableName WebhookIncoming
1314
$Webhooks = Get-CIPPAzDataTableEntity @WebhookTable

Modules/CIPPCore/Public/Test-CIPPAccessPermissions.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ function Test-CIPPAccessPermissions {
2525
}
2626
$Success = $true
2727
try {
28+
Set-Location (Get-Item $PSScriptRoot).FullName
2829
$null = Get-CIPPAuthentication
2930
$GraphToken = Get-GraphToken -returnRefresh $true -SkipCache $true
3031
if ($GraphToken) {

Modules/CippEntrypoints/CippEntrypoints.psm1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function Receive-CippHttpTrigger {
3939

4040
# Convert the request to a PSCustomObject because the httpContext is case sensitive since 7.3
4141
$Request = $Request | ConvertTo-Json -Depth 100 | ConvertFrom-Json
42+
Set-Location (Get-Item $PSScriptRoot).Parent.Parent.FullName
4243

4344
if ($Request.Params.CIPPEndpoint -eq '$batch') {
4445
# Implement batch processing in the style of graph api $batch

Modules/CippExtensions/Public/NinjaOne/Invoke-NinjaOneTenantSync.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,6 +1846,9 @@ function Invoke-NinjaOneTenantSync {
18461846

18471847
### CIPP Applied Standards Cards
18481848
Write-Information 'Applied Standards'
1849+
$ModuleBase = Get-Module CIPPExtensions | Select-Object -ExpandProperty ModuleBase
1850+
$CIPPRoot = (Get-Item $ModuleBase).Parent.Parent.FullName
1851+
Set-Location $CIPPRoot
18491852

18501853
try {
18511854
$StandardsDefinitions = Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/KelvinTegelaar/CIPP/refs/heads/main/src/data/standards.json'

0 commit comments

Comments
 (0)