Skip to content

Commit

Permalink
rightsGuid has proper transform
Browse files Browse the repository at this point in the history
  • Loading branch information
jformacek committed Sep 13, 2022
1 parent 15d6083 commit c517b59
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Transforms/guid.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if($FullLoad)

$codeBlock= New-LdapAttributeTransformDefinition `
-SupportedAttributes @('appliesTo','attributeSecurityGUID','objectGuid', `
'mS-DS-ConsistencyGuid','msExchMailboxGuid','rightsGuid','schemaIDGUID', `
'mS-DS-ConsistencyGuid','msExchMailboxGuid','schemaIDGUID', `
'msExchArchiveGUID') `
-BinaryInput

Expand Down
39 changes: 39 additions & 0 deletions Transforms/textGuid.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[CmdletBinding()]
param (
[Parameter()]
[Switch]
$FullLoad
)

if($FullLoad)
{
}

$codeBlock= New-LdapAttributeTransformDefinition -SupportedAttributes @('rightsGuid')

$codeBlock.OnLoad = {
param(
[string[]]$Values
)
Process
{
foreach($Value in $Values)
{
[Guid]::Parse($value)
}
}
}
$codeBlock.OnSave = {
param(
[Guid[]]$Values
)

Process
{
foreach($value in $values)
{
"$value"
}
}
}
$codeBlock

0 comments on commit c517b59

Please sign in to comment.