Skip to content
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

Closed
wants to merge 11 commits into from
Closed

Add Active Directory ACL Functionnality #341

wants to merge 11 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 24, 2022

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
  • Feature Pull Request
  • New Module Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

@jborean93
Copy link
Collaborator

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 $rights and not $rightss (2 s').

@ghost
Copy link
Author

ghost commented Mar 28, 2022

Yes, Thx, i made the change !

}

ActiveDirectory {
$objACE = New-Object System.DirectoryServices.ActiveDirectoryAccessRule ($objUser, $colRights, $objType)

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.

Copy link
Author

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")) {

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

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants