diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml index dd860413..e170a55d 100644 --- a/.github/workflows/winget.yml +++ b/.github/workflows/winget.yml @@ -10,7 +10,7 @@ jobs: - uses: vedantmgoyal2009/winget-releaser@v2 with: identifier: taers232c.GAMADV-XTD3 - release-tag: v7.00.37 + release-tag: v7.00.38 max-versions-to-keep: 1 # keep only latest versions installers-regex: '\.msi$' token: ${{ secrets.WINGET_TOKEN }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 244e04c9..87961381 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,10 +95,10 @@ script: before_deploy: # Comment out for Linux Xenial and Trusty -#- yes | gem update --system --force -#- gem install bundler -#- gem install uri -#- gem install logger +- yes | gem update --system --force +- gem install bundler +- gem install uri +- gem install logger - export TRAVIS_TAG="preview" - unset LD_LIBRARY_PATH @@ -111,10 +111,10 @@ deploy: skip_cleanup: true draft: true # Linux 64-Bit Bionic and Linux ARM64 Focal and Linux ARM64 Bionic and Linux ARM64 Xenial -# edge: true + edge: true # Linux Xenial and Trusty - edge: - branch: v2.0.3-beta.4 +# edge: +# branch: v2.0.3-beta.4 # branch: v2.0.5-beta.1 on: repo: taers232c/GAMADV-XTD3 diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index a0ea3f9e..3f4e6830 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,7 @@ +7.00.38 + +Fixed logic flaw in `gam print|show policies` where non-matching policies were displayed. + 7.00.37 Added options `group ` and `ou|org|orgunit ` diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 3c3ef236..9d658ef9 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ """ __author__ = 'Ross Scroggs ' -__version__ = '7.00.37' +__version__ = '7.00.38' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -35047,13 +35047,17 @@ def _cleanPolicy(policy, add_warnings, no_appnames, policy['warning'] = CIPOLICY_ADDITIONAL_WARNINGS[policy['setting']['type']] if groupId := policy['policyQuery'].get('group'): _, _, policy['policyQuery']['groupEmail'] = convertGroupCloudIDToEmail(groups_ci, groupId) - if groupEmailPattern is not None and not groupEmailPattern.match(policy['policyQuery']['groupEmail']): - return False # all groups are in the root OU so the orgUnit attribute is useless policy['policyQuery'].pop('orgUnit', None) + if groupEmailPattern is not None: + return groupEmailPattern.match(policy['policyQuery']['groupEmail']) + if orgUnitPathPattern is not None: + return False elif orgId := policy['policyQuery'].get('orgUnit'): policy['policyQuery']['orgUnitPath'] = convertOrgUnitIDtoPath(cd, orgId) - if orgUnitPathPattern is not None and not orgUnitPathPattern.match(policy['policyQuery']['orgUnitPath']): + if orgUnitPathPattern is not None: + return orgUnitPathPattern.match(policy['policyQuery']['orgUnitPath']) + if groupEmailPattern is not None: return False return True