bundles/openssh: do not add deleted users to ssh config
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit

This commit is contained in:
Franzi 2021-02-18 15:12:30 +01:00
parent f036336f30
commit 1abc0153f5
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -2,7 +2,7 @@ users_from_metadata = set()
additional_users = node.metadata.get('openssh', {}).get('allowed_users', set()) additional_users = node.metadata.get('openssh', {}).get('allowed_users', set())
for user, config in node.metadata.get('users', {}).items(): for user, config in node.metadata.get('users', {}).items():
if 'ssh_pubkey' in config: if 'ssh_pubkey' in config and not config.get('delete', False):
users_from_metadata.add(user) users_from_metadata.add(user)
login_users = users_from_metadata.union(additional_users) login_users = users_from_metadata.union(additional_users)