controls/identity-remove-from-role-modal.ps1
function New-UARemoveIdentityFromRoleModal { param ( [Parameter(Mandatory = $true)] $Identity, [Parameter(Mandatory = $true)] $Role ) Show-UDModal -Content { New-UDPageHeader -Text ("Removing Identity from Role") New-UDParagraph -Text "Are you sure you wish to remove Identity: $($Identity.Name) from Role: $($Role.Name)?" New-UDElement -Tag div -Attributes @{ style = @{ textAlign = "right" } } -Content { New-UDButton -Text "Confirm" -Icon check -OnClick { Set-UAIdentity -Identity $Identity -Role $Null Sync-UDElement -Id "identity-grid" -Broadcast Sync-UDElement -Id "role-grid" -Broadcast Hide-UDModal } } } } |