diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-15 13:03:50 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-15 13:03:50 -0400 |
commit | 61fc766d07e5252b9618c6548ea714649ab54a54 (patch) | |
tree | 38b7b8bd1057269ca40f2e63d570abbe3864ca02 /bin/pgp-list-keyids | |
parent | 30b47ce9573dde234210ea9e0d1606ee5104b96e (diff) |
Pull tool configuration into a hackers-git.yml
Diffstat (limited to 'bin/pgp-list-keyids')
-rwxr-xr-x | bin/pgp-list-keyids | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/bin/pgp-list-keyids b/bin/pgp-list-keyids index 93bc292..1807faa 100755 --- a/bin/pgp-list-keyids +++ b/bin/pgp-list-keyids @@ -1,20 +1,13 @@ #!/usr/bin/env ruby # Usage: pgp-list-keyids -cfg_groups = { - :trusted => [ "hackers", "bots" ], - :secondary => [ "trustedusers" ] -} -###################################################################### -require 'yaml' +load "#{File.dirname(__FILE__)}/common.rb" -users = Dir.glob("users/*.yml").map{|f|YAML::load(open(f))} - -users.each do |user| +load_all_users.each do |user| if user["groups"] - if ! (user["groups"] & cfg_groups[:trusted]).empty? + if user["groups"].include?("keyring-trusted") puts "trusted/#{user["username"]} #{user["pgp_keyid"]}" - elsif ! (user["groups"] & cfg_groups[:secondary]).empty? + elsif user["groups"].include?("keyring-secondary") puts "secondary/#{user["username"]} #{user["pgp_keyid"]}" elsif user["pgp_keyid"] puts "revoked/#{user["username"]} #{user["pgp_keyid"]}" |