Skip to content

Commit 0b6b5f1

Browse files
authored
Merge pull request #598 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents c2cc6a8 + 671853f commit 0b6b5f1

File tree

3 files changed

+50
-8
lines changed

3 files changed

+50
-8
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
2+
# More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+
name: Build and deploy Powershell project to Azure Function App - cippkdsva
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
env:
13+
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
14+
15+
jobs:
16+
deploy:
17+
runs-on: windows-latest
18+
19+
steps:
20+
- name: 'Checkout GitHub Action'
21+
uses: actions/checkout@v4
22+
23+
- name: 'Run Azure Functions Action'
24+
uses: Azure/functions-action@v1
25+
id: fa
26+
with:
27+
app-name: 'cippkdsva'
28+
slot-name: 'Production'
29+
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
30+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_9BFC7AE407A849B7AC30AC56DFA1F49E }}

Modules/CIPPCore/Public/Webhooks/Test-CIPPAuditLogRules.ps1

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,25 @@ function Test-CIPPAuditLogRules {
126126
$TrustedIPTable = Get-CIPPTable -TableName 'trustedIps'
127127
$ConfigTable = Get-CIPPTable -TableName 'WebhookRules'
128128
$ConfigEntries = Get-CIPPAzDataTableEntity @ConfigTable
129-
$Configuration = $ConfigEntries | Where-Object { ($_.Tenants -match $TenantFilter -or $_.Tenants -match 'AllTenants') } | ForEach-Object {
130-
[pscustomobject]@{
131-
Tenants = ($_.Tenants | ConvertFrom-Json)
132-
Excluded = ($_.excludedTenants | ConvertFrom-Json -ErrorAction SilentlyContinue)
133-
Conditions = $_.Conditions
134-
Actions = $_.Actions
135-
LogType = $_.Type
129+
$Configuration = foreach ($ConfigEntry in $ConfigEntries) {
130+
if ([string]::IsNullOrEmpty($ConfigEntry.Tenants)) {
131+
continue
132+
}
133+
$Tenants = $ConfigEntry.Tenants | ConvertFrom-Json -ErrorAction SilentlyContinue
134+
if ($null -eq $Tenants) {
135+
continue
136+
}
137+
# Expand tenant groups to get actual tenant list
138+
$ExpandedTenants = Expand-CIPPTenantGroups -TenantFilter $Tenants
139+
# Check if the TenantFilter matches any tenant in the expanded list or AllTenants
140+
if ($ExpandedTenants.value -contains $TenantFilter -or $ExpandedTenants.value -contains 'AllTenants') {
141+
[pscustomobject]@{
142+
Tenants = $Tenants
143+
Excluded = ($ConfigEntry.excludedTenants | ConvertFrom-Json -ErrorAction SilentlyContinue)
144+
Conditions = $ConfigEntry.Conditions
145+
Actions = $ConfigEntry.Actions
146+
LogType = $ConfigEntry.Type
147+
}
136148
}
137149
}
138150

Modules/CippExtensions/Public/PwPush/Get-PwPushAccount.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function Get-PwPushAccount {
22
$Table = Get-CIPPTable -TableName Extensionsconfig
33
$Configuration = ((Get-CIPPAzDataTableEntity @Table).config | ConvertFrom-Json).PWPush
4-
if ($Configuration.Enabled -eq $true -and $Configuration.PWPushPro -eq $true) {
4+
if ($Configuration.Enabled -eq $true -and $Configuration.UseBearerAuth -eq $true) {
55
Set-PwPushConfig -Configuration $Configuration
66
Get-PushAccount
77
} else {

0 commit comments

Comments
 (0)