bundlewrap/bundles/sudo/metadata.py

12 lines
255 B
Python
Raw Normal View History

2020-08-18 13:27:55 +00:00
@metadata_reactor
2020-03-27 11:52:17 +00:00
def sudo_users(metadata):
2020-08-18 13:27:55 +00:00
sudoers = set()
2020-03-27 11:52:17 +00:00
for username, config in metadata.get('users', {}).items():
if 'sudo' in config and config['sudo']:
2020-08-18 13:27:55 +00:00
sudoers.add(username)
2020-03-27 11:52:17 +00:00
2020-08-18 13:27:55 +00:00
return {
'sudo': sudoers,
}