Skip to content

Commit

Permalink
[pgsense_user] Process groups separately
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Jan 27, 2025
1 parent 7243583 commit 0c98385
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/modules/pfsense_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@
]


def parse_groups(self, name, params, obj):
# Groups are not stored in the user object
if params[name] is not None:
self.user_groups = params[name]


def p2o_ssh_pub_key(self, name, params, obj):
# Allow ssh keys to be clear or base64 encoded
if params[name] is not None and 'ssh-' in params[name]:
Expand All @@ -116,6 +122,7 @@ def validate_password(self, password):

USER_ARG_ROUTE = dict(
authorizedkeys=dict(parse=p2o_ssh_pub_key),
groups=dict(parse=parse_groups),
password=dict(validate=validate_password),
)

Expand Down

0 comments on commit 0c98385

Please sign in to comment.