Skip to content

Commit e292d25

Browse files
Merge pull request KelvinTegelaar#1632 from Zacgoose/api-helper-desc
Feat: Return descriptions for api functions if present
2 parents 07abb10 + 563b801 commit e292d25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Modules/CIPPCore/Public/Authentication/Get-CIPPHttpFunctions.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ function Get-CIPPHttpFunctions {
1111
if ($Help.Functionality -notmatch 'Entrypoint') { continue }
1212
if ($Help.Role -eq 'Public') { continue }
1313
[PSCustomObject]@{
14-
Function = $Function.Name
15-
Role = $Help.Role
14+
Function = $Function.Name
15+
Role = $Help.Role
16+
Description = $Help.Description
1617
}
1718
}
1819

1920
if ($ByRole.IsPresent -or $ByRoleGroup.IsPresent) {
20-
$Results = $Results | Group-Object -Property Role | Select-Object -Property @{l = 'Permission'; e = { $_.Name -eq '' ? 'None' : $_.Name } }, Count, @{l = 'Functions'; e = { $_.Group.Function -replace 'Invoke-' } } | Sort-Object -Property Permission
21-
21+
$Results = $Results | Group-Object -Property Role | Select-Object -Property @{l = 'Permission'; e = { $_.Name -eq '' ? 'None' : $_.Name } }, Count, @{l = 'Functions'; e = { $_.Group | Select-Object @{l='Name'; e={$_.Function -replace 'Invoke-'}}, Description } } | Sort-Object -Property Permission
2222
if ($ByRoleGroup.IsPresent) {
2323
$RoleGroup = @{}
2424
foreach ($Permission in $Results) {

0 commit comments

Comments
 (0)