Skip to content

Commit

Permalink
added default break
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Aug 10, 2023
1 parent 0d577b1 commit 332478c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Modules/CIPPCore/Public/Invoke-CIPPWebhookProcessing.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ function Invoke-CippWebhookProcessing {
#Custom cipp operations.
switch ($data.operation) {
{ "UserloggedIn" -and $data.UserType -eq 2 } { $data.operation = "AdminLoggedIn"; break }
{ "UserLoggedIn" -and $Country -notin $AllowedLocations } { $data.operation = "UserLoggedInFromUnknownLocation" ; break }
{ "UserLoggedIn" -and @($Country) -notin $AllowedLocations } { $data.operation = "UserLoggedInFromUnknownLocation" ; break }
default { break }
}
#Check if the operation is allowed for this webhook.
if ($data.operation -notin $Operations) {
Write-Host "No need to process this operation."
return ""
}
#Make URL frontend URL:
$CIPPPURL = $CIPPURL -split '/API' | select-object -first 1
$CIPPPURL = $CIPPURL -split '/API' | Select-Object -First 1
switch ($data.Operation) {
"New-InboxRule" {
$Title = "$($TenantFilter) - New Rule Detected for $($data.UserId)"
Expand Down

0 comments on commit 332478c

Please sign in to comment.