bundlewrap/bundles/sudo/metadata.py
2020-08-18 15:31:52 +02:00

11 lines
255 B
Python

@metadata_reactor
def sudo_users(metadata):
sudoers = set()
for username, config in metadata.get('users', {}).items():
if 'sudo' in config and config['sudo']:
sudoers.add(username)
return {
'sudo': sudoers,
}