11 lines
264 B
Python
11 lines
264 B
Python
@metadata_reactor
|
|
def sudo_users(metadata):
|
|
sudoers = {}
|
|
|
|
for username, config in metadata.get('users', {}).items():
|
|
if 'sudo_commands' in config:
|
|
sudoers[username] = config['sudo_commands']
|
|
|
|
return {
|
|
'sudo': sudoers,
|
|
}
|