-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Move some functions, modernize and support POST and GET #1313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 34 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
65354e8
Change to POST
kris6673 3bde938
Refactor Set-CIPPMailboxType function to use consistent parameter cas…
kris6673 cb477ee
Change to POST
kris6673 fa94d4b
Implement and replace mailbox conversions with Invoke-ExecConvertMailbox
kris6673 e3ca0a0
Support POST and new messages
kris6673 23923ad
Change to POST and modernize
kris6673 70a6683
Fix casing for tenant filter and improve error logging in Invoke-List…
kris6673 0a61a45
Fix casing for Get-UnifiedGroup command and improve logging in Invoke…
kris6673 941b6be
Move some endpoints around
kris6673 dd4ac1e
Refactor Invoke-EditSpamFilter and Invoke-RemoveSpamfilter for improv…
kris6673 7b6b71c
Enhance Invoke-ExecRemoveMailboxRule and Remove-CIPPMailboxRule for i…
kris6673 4b28940
Fix casing and improve comments in Invoke-ExecSendPush function for c…
kris6673 bf96766
Refactor Invoke-ExecEnableArchive for improved error handling and par…
kris6673 735d61a
Refactor Invoke-ExecDisableUser and Set-CIPPSignInState for improved …
kris6673 6a3f4b8
Refactor Invoke-ExecResetPass for improved parameter handling, error …
kris6673 ea8e734
Refactor Invoke-ExecRevokeSessions and Revoke-CIPPSessions for improv…
kris6673 31bc097
Refactor Invoke-RemoveUser for improved parameter handling, logging, …
kris6673 f1e7549
Modernize and support POST
kris6673 0b19f8a
Modernize
kris6673 7562863
Refactor Invoke-RemoveConnectionfilterTemplate for improved parameter…
kris6673 ad8b04f
Modernize
kris6673 f366798
Small bit of cleanup
kris6673 abfd081
Modernizations and support POST
kris6673 6c2ff6f
Remove unused comment
kris6673 b513b19
Add listType property manually to make deletion possible without too …
kris6673 0df2009
Better logging message
kris6673 71b7002
Dont import stuff that isnt needed
kris6673 4e3524c
add forgotten logging
kris6673 b1e77ca
Modernize more endpoints
kris6673 096b65d
Fix SP site admin permission changes
kris6673 d55cd03
Refactor API logging and parameter handling for consistency
kris6673 ff41a68
remove unused endpoint
kris6673 d26e457
Refactor tenant filter handling and improve logging consistency acros…
kris6673 ca9a658
Various modernizations and GET to POST refactoring
kris6673 0d81d82
Refactor API functions to improve parameter handling and logging cons…
kris6673 12d7e71
Refactor API functions to enhance parameter handling and improve logg…
kris6673 83e55d4
Refactor email filter functions to improve parameter handling and log…
kris6673 fef5710
typo
kris6673 e246aac
Refactor API functions to improve header handling, error messaging, a…
kris6673 ea27a05
Refactor API functions to enhance parameter handling, logging consist…
kris6673 6bd7c23
fix dumb
kris6673 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...s/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Invoke-ExecConvertMailbox.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using namespace System.Net | ||
|
||
Function Invoke-ExecConvertMailbox { | ||
<# | ||
.FUNCTIONALITY | ||
Entrypoint | ||
.ROLE | ||
Exchange.Mailbox.ReadWrite | ||
#> | ||
[CmdletBinding()] | ||
param($Request, $TriggerMetadata) | ||
|
||
$APIName = $Request.Params.CIPPEndpoint | ||
$TenantFilter = $Request.Body.tenantFilter | ||
Write-LogMessage -Headers $Request.Headers -API $APIName -message 'Accessed this API' -Sev 'Debug' | ||
|
||
# Interact with query parameters or the body of the request. | ||
$UserID = $Request.Body.ID | ||
$MailboxType = $Request.Body.MailboxType | ||
|
||
try { | ||
$ConvertedMailbox = Set-CIPPMailboxType -UserID $UserID -TenantFilter $TenantFilter -APIName $APIName -Headers $Request.Headers -MailboxType $MailboxType | ||
if ($ConvertedMailbox -like 'Could not convert*') { throw $ConvertedMailbox } | ||
$Results = [pscustomobject]@{'Results' = "$ConvertedMailbox" } | ||
$StatusCode = [HttpStatusCode]::OK | ||
} catch { | ||
$ErrorMessage = $_.Exception.Message | ||
$Results = [pscustomobject]@{'Results' = "$ErrorMessage" } | ||
$StatusCode = [HttpStatusCode]::InternalServerError | ||
} | ||
# Associate values to output bindings by calling 'Push-OutputBinding'. | ||
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{ | ||
StatusCode = $StatusCode | ||
Body = $Results | ||
}) | ||
|
||
} |
36 changes: 0 additions & 36 deletions
36
...Core/Public/Entrypoints/HTTP Functions/Email-Exchange/Invoke-ExecConverttoRoomMailbox.ps1
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
...re/Public/Entrypoints/HTTP Functions/Email-Exchange/Invoke-ExecConverttoSharedMailbox.ps1
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.