bundlewrap/bundles/sudo/metadata.py

12 lines
264 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):
sudoers = {}
2020-03-27 11:52:17 +00:00
for username, config in metadata.get('users', {}).items():
if 'sudo_commands' in config:
sudoers[username] = config['sudo_commands']
2020-03-27 11:52:17 +00:00
2020-08-18 13:27:55 +00:00
return {
'sudo': sudoers,
}