Skip to content

Commit

Permalink
Add a default option (#302)
Browse files Browse the repository at this point in the history
* Add a default option to prevent returning an empty string to match.compound removing error addressed in #297

* Clean up outdated refrences of `mailman` in users.sls

* Restore mailman group bits
  • Loading branch information
cegerhardson committed Feb 8, 2023
1 parent b19e31d commit 24fae9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions pillar/base/users.sls
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ users:
allowed: True
groups:
- downloads
mailman:
allowed: True
sudo: True
mail:
allowed: True
sudo: True
Expand Down
4 changes: 2 additions & 2 deletions salt/users/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include:
{% for user_name, user_config in salt["pillar.get"]("users", {}).items() %}
{% set admin = user_config.get("admin", false) %}
{% set access = {} %}
{% for pat, data in user_config.get("access", {}).items() if salt["match.compound"](salt["pillar.get"]("roles:" + pat + ":pattern")) %} # " Syntax fix
{% for pat, data in user_config.get("access", {}).items() if salt["match.compound"](salt["pillar.get"]("roles:" + pat + ":pattern", "devnull.psf.io")) %} # " Syntax fix
{% do access.update(data) %}
{% endfor %}

Expand All @@ -22,7 +22,7 @@ include:
{% for user_name, user_config in salt["pillar.get"]("users", {}).items() %}
{% set admin = user_config.get("admin", false) %}
{% set access = {} %}
{% for pat, data in user_config.get("access", {}).items() if salt["match.compound"](salt["pillar.get"]("roles:" + pat + ":pattern")) %} # " Syntax fix
{% for pat, data in user_config.get("access", {}).items() if salt["match.compound"](salt["pillar.get"]("roles:" + pat + ":pattern", "devnull.psf.io")) %} # " Syntax fix
{% do access.update(data) %}
{% endfor %}

Expand Down

0 comments on commit 24fae9b

Please sign in to comment.