Skip to content

Commit 3fbe8b3

Browse files
authored
Merge pull request KelvinTegelaar#1753 from KelvinTegelaar/dev
Dev to hotfix
2 parents 6b50f40 + 5f55eaf commit 3fbe8b3

File tree

17 files changed

+86
-36
lines changed

17 files changed

+86
-36
lines changed

Modules/CIPPCore/Public/Alerts/Get-CIPPAlertQuarantineReleaseRequests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
MessageId = $Message.MessageId
3939
Subject = $Message.Subject
4040
SenderAddress = $Message.SenderAddress
41-
RecipientAddress = $Message.RecipientAddress
41+
RecipientAddress = $Message.RecipientAddress -join '; '
4242
Type = $Message.Type
4343
PolicyName = $Message.PolicyName
4444
ReleaseStatus = $Message.ReleaseStatus

Modules/CIPPCore/Public/Alerts/Get-CIPPAlertRestrictedUsers.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
Write-AlertTrace -cmdletName $MyInvocation.MyCommand -tenantFilter $TenantFilter -data $AlertData
3838
}
3939
} catch {
40-
Write-LogMessage -tenant $($TenantFilter) -message "Could not get restricted users for $($TenantFilter): $(Get-NormalizedError -message $_.Exception.message)" -severity 'Error' -API 'Get-CIPPAlertRestrictedUsers' -LogData (Get-CippException -Exception $_)
40+
# Write-LogMessage -tenant $($TenantFilter) -message "Could not get restricted users for $($TenantFilter): $(Get-NormalizedError -message $_.Exception.message)" -severity 'Error' -API 'Get-CIPPAlertRestrictedUsers' -LogData (Get-CippException -Exception $_)
4141
}
4242
}

Modules/CIPPCore/Public/Alerts/Get-CIPPAlertTERRL.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ function Get-CIPPAlertTERRL {
3535
}
3636
}
3737
} catch {
38-
Write-AlertMessage -tenant $($TenantFilter) -message "Could not get TERRL status for $($TenantFilter): $(Get-NormalizedError -message $_.Exception.message)"
38+
Write-LogMessage -tenant $($TenantFilter) -message "Could not get TERRL status for $($TenantFilter): $(Get-NormalizedError -message $_.Exception.message)" -severity 'Error' -API 'CIPPAlertTERRL' -LogData (Get-CippException -Exception $_)
3939
}
4040
}

Modules/CIPPCore/Public/Authentication/Test-CIPPAccess.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ function Test-CIPPAccess {
1717
$CIPPCoreModule = Get-Module -Name CIPPCore
1818
if ($CIPPCoreModule) {
1919
$PermissionsFileJson = Join-Path $CIPPCoreModule.ModuleBase 'lib' 'data' 'function-permissions.json'
20-
20+
2121
if (Test-Path $PermissionsFileJson) {
2222
try {
2323
$jsonData = Get-Content -Path $PermissionsFileJson -Raw | ConvertFrom-Json -AsHashtable
2424
$global:CIPPFunctionPermissions = [System.Collections.Hashtable]::new([StringComparer]::OrdinalIgnoreCase)
2525
foreach ($key in $jsonData.Keys) {
2626
$global:CIPPFunctionPermissions[$key] = $jsonData[$key]
2727
}
28-
Write-Information "Loaded $($global:CIPPFunctionPermissions.Count) function permissions from JSON cache"
28+
Write-Debug "Loaded $($global:CIPPFunctionPermissions.Count) function permissions from JSON cache"
2929
} catch {
3030
Write-Warning "Failed to load function permissions from JSON: $($_.Exception.Message)"
3131
}
@@ -41,13 +41,13 @@ function Test-CIPPAccess {
4141
$PermissionData = $global:CIPPFunctionPermissions[$FunctionName]
4242
$APIRole = $PermissionData['Role']
4343
$Functionality = $PermissionData['Functionality']
44-
Write-Information "Loaded function permission data from cache for '$FunctionName': Role='$APIRole', Functionality='$Functionality'"
44+
Write-Debug "Loaded function permission data from cache for '$FunctionName': Role='$APIRole', Functionality='$Functionality'"
4545
} else {
4646
try {
4747
$Help = Get-Help $FunctionName -ErrorAction Stop
4848
$APIRole = $Help.Role
4949
$Functionality = $Help.Functionality
50-
Write-Information "Loaded function permission data via Get-Help for '$FunctionName': Role='$APIRole', Functionality='$Functionality'"
50+
Write-Debug "Loaded function permission data via Get-Help for '$FunctionName': Role='$APIRole', Functionality='$Functionality'"
5151
} catch {
5252
Write-Warning "Function '$FunctionName' not found"
5353
}

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecListBackup.ps1

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,21 @@ function Invoke-ExecListBackup {
2121

2222
if ($NameOnly) {
2323
$Processed = foreach ($item in $Result) {
24-
$properties = $item.PSObject.Properties | Where-Object { $_.Name -notin @('TenantFilter', 'ETag', 'PartitionKey', 'RowKey', 'Timestamp') -and $_.Value }
25-
[PSCustomObject]@{
26-
BackupName = $item.RowKey
27-
Timestamp = $item.Timestamp
28-
Items = $properties.Name
24+
$properties = $item.PSObject.Properties | Where-Object { $_.Name -notin @('TenantFilter', 'ETag', 'PartitionKey', 'RowKey', 'Timestamp', 'OriginalEntityId', 'SplitOverProps', 'PartIndex') -and $_.Value }
25+
26+
if ($Type -eq 'Scheduled') {
27+
[PSCustomObject]@{
28+
TenantFilter = $item.RowKey -match '^(.*?)_' | ForEach-Object { $matches[1] }
29+
BackupName = $item.RowKey
30+
Timestamp = $item.Timestamp
31+
Items = $properties.Name
32+
}
33+
} else {
34+
[PSCustomObject]@{
35+
BackupName = $item.RowKey
36+
Timestamp = $item.Timestamp
37+
}
38+
2939
}
3040
}
3141
$Result = $Processed | Sort-Object Timestamp -Descending

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM/Invoke-ListIntuneTemplates.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ function Invoke-ListIntuneTemplates {
3939
$data | Add-Member -NotePropertyName 'Type' -NotePropertyValue $JSONData.Type -Force
4040
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.RowKey -Force
4141
$data | Add-Member -NotePropertyName 'package' -NotePropertyValue $_.Package -Force
42-
$data | Add-Member -NotePropertyName 'isSynced' -NotePropertyValue (![string]::IsNullOrEmpty($_.SHA))
42+
$data | Add-Member -NotePropertyName 'isSynced' -NotePropertyValue (![string]::IsNullOrEmpty($_.SHA)) -Force
43+
$data | Add-Member -NotePropertyName 'source' -NotePropertyValue $_.Source -Force
4344
$data
4445
} catch {
4546

@@ -65,6 +66,8 @@ function Invoke-ListIntuneTemplates {
6566
$data | Add-Member -NotePropertyName 'Type' -NotePropertyValue $JSONData.Type -Force
6667
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.RowKey -Force
6768
$data | Add-Member -NotePropertyName 'package' -NotePropertyValue $_.Package -Force
69+
$data | Add-Member -NotePropertyName 'source' -NotePropertyValue $_.Source -Force
70+
$data | Add-Member -NotePropertyName 'isSynced' -NotePropertyValue (![string]::IsNullOrEmpty($_.SHA)) -Force
6871
$data
6972
} catch {
7073

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Groups/Invoke-ListGroupTemplates.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ function Invoke-ListGroupTemplates {
4848
allowExternal = $data.allowExternal
4949
username = $data.username
5050
GUID = $_.RowKey
51+
source = $_.Source
52+
isSynced = (![string]::IsNullOrEmpty($_.SHA))
5153
}
5254
} catch {
5355
Write-Information "Could not parse group template $($_.RowKey): $($_.Exception.Message)"

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Conditional/Invoke-ListCAtemplates.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ function Invoke-ListCAtemplates {
3535
$row = $_
3636
$data = $row.JSON | ConvertFrom-Json -Depth 100 -ErrorAction Stop
3737
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $row.GUID -Force
38+
$data | Add-Member -NotePropertyName 'source' -NotePropertyValue $row.Source -Force
39+
$data | Add-Member -NotePropertyName 'isSynced' -NotePropertyValue (![string]::IsNullOrEmpty($row.SHA)) -Force
3840
$data
3941
} catch {
4042
Write-Warning "Failed to process CA template: $($row.RowKey) - $($_.Exception.Message)"

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-listStandardTemplates.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ function Invoke-listStandardTemplates {
2323
}
2424
if ($Data) {
2525
$Data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force
26+
$Data | Add-Member -NotePropertyName 'source' -NotePropertyValue $_.Source -Force
27+
$Data | Add-Member -NotePropertyName 'isSynced' -NotePropertyValue (![string]::IsNullOrEmpty($_.SHA)) -Force
2628

2729
if (!$Data.excludedTenants) {
2830
$Data | Add-Member -NotePropertyName 'excludedTenants' -NotePropertyValue @() -Force

Modules/CIPPCore/Public/Entrypoints/Timer Functions/Start-UpdateTokensTimer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function Start-UpdateTokensTimer {
6868
Write-Information "Found $($ExpiredSecrets.Count) expired application secrets for $AppId. Removing them."
6969
foreach ($Secret in $ExpiredSecrets) {
7070
try {
71-
New-GraphPostRequest -type DELETE -uri "https://graph.microsoft.com/v1.0/applications/$($PasswordCredentials.id)/removePassword" -Body "{`"keyId`":`"$($Secret.keyId)`"}" -NoAuthCheck $true -AsApp $true -ErrorAction Stop
71+
New-GraphPostRequest -uri "https://graph.microsoft.com/v1.0/applications/$($PasswordCredentials.id)/removePassword" -Body "{`"keyId`":`"$($Secret.keyId)`"}" -NoAuthCheck $true -AsApp $true -ErrorAction Stop
7272
Write-Information "Removed expired application secret with keyId $($Secret.keyId)."
7373
} catch {
7474
Write-LogMessage -API 'Update Tokens' -message "Error removing expired application secret with keyId $($Secret.keyId), see Log Data for details." -sev 'CRITICAL' -LogData (Get-CippException -Exception $_)

0 commit comments

Comments
 (0)