Created
March 8, 2016 17:17
-
-
Save hlindberg/3ee308e5470b98f563c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$limited_sudo = hiera('staff::allowed::sudo', undef) | |
if ( $limited_sudo ) { | |
$allowed_sudo = $limited_sudo.reduce( false ) |$allowed_sudo, $entry[ { | |
$team = $entry[1] | |
case [$allowed_sudo, $team, $username in hiera($team)] { | |
[ false, /::team::/, true] : { | |
warning ("Allowing sudo") | |
warning ("1: true") | |
true | |
} | |
default : { | |
$allowed_sudo | |
} | |
} | |
} | |
} | |
warning ("2: $allowed_sudo") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment