bundlewrap/bundles/ssh/metadata.py
2022-02-12 13:41:03 +01:00

13 lines
348 B
Python

@metadata_reactor.provides(
'ssh/allow_users',
)
def users(metadata):
return {
'ssh': {
'allow_users': set(
name
for name, conf in metadata.get('users').items()
if conf.get('authorized_keys', []) or conf.get('authorized_users', [])
),
},
}