11 lines
255 B
Python
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,
|
|
}
|