-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add Active Directory ACL Functionnality #341
Conversation
Thanks for the PR. It seems like the changes have caused a problem with the existing tests that we have in place. Looks like the problem lies with the line https://github.com/ansible-collections/ansible.windows/pull/341/files#diff-ebc9a4cdfaac4d872d5077dbe36791e64f096985dcd89b8a00f000e736a0778bR139. I believe you want |
Yes, Thx, i made the change ! |
plugins/modules/win_acl.ps1
Outdated
} | ||
|
||
ActiveDirectory { | ||
$objACE = New-Object System.DirectoryServices.ActiveDirectoryAccessRule ($objUser, $colRights, $objType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you update this constructor to $objACE = New-Object System.DirectoryServices.ActiveDirectoryAccessRule ($objUser, $colRights, $objType, $InheritanceFlag)
you can also apply the inheritance settings provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx a lot ! Have you commit this changes or can you did that ?
@@ -206,7 +239,7 @@ Try { | |||
ElseIf ($state -eq "absent" -And $match -eq $true) { | |||
Try { | |||
$objACL.RemoveAccessRule($objACE) | |||
If ($path_item.PSProvider.Name -eq "Registry") { | |||
If (($path_item.PSProvider.Name -eq "Registry") -or ($path_item.PSProvider.Name -eq "ActiveDirectory")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handling for ActiveDirectory is also needed on line 227 or the module only works for the absent
state in my testing
SUMMARY
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION