Skip to content

Commit

Permalink
Merge pull request #54386 from twangboy/fix_test_win_dacl_2019.2.1
Browse files Browse the repository at this point in the history
Fix unit.utils.test_win_dacl (2019.2.1)
  • Loading branch information
dwoz committed Sep 3, 2019
2 parents b4caaad + b8fa7d3 commit 5161203
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions salt/utils/win_dacl.py
Expand Up @@ -931,6 +931,7 @@ def _ace_to_dict(self, ace):
if ace[1] & perm == perm:
ace_perms.append(
self.ace_perms[obj_type]['advanced'][perm])
ace_perms.sort()

# If still nothing, it must be undefined
if not ace_perms:
Expand Down
14 changes: 7 additions & 7 deletions tests/unit/utils/test_win_dacl.py
Expand Up @@ -295,10 +295,10 @@ def test_check_perms(self):
'NETWORK SERVICE': {
'deny': {
'applies to': 'This key and subkeys',
'permissions': ['Set Value',
'Delete',
'Write Owner',
'Write DAC']}}}}
'permissions': ['Delete',
'Set Value',
'Write DAC',
'Write Owner']}}}}
self.assertDictEqual(
win_dacl.get_permissions(
obj_name=self.obj_name,
Expand Down Expand Up @@ -595,10 +595,10 @@ def test_check_perms(self):
'NETWORK SERVICE': {
'deny': {
'applies to': 'Not Inherited (file)',
'permissions': ['Delete',
'permissions': ['Change permissions',
'Create files / write data',
'Write attributes',
'Change permissions']}}}}
'Delete',
'Write attributes']}}}}
self.assertDictEqual(
win_dacl.get_permissions(
obj_name=self.obj_name,
Expand Down

0 comments on commit 5161203

Please sign in to comment.