summaryrefslogtreecommitdiff
path: root/bin/pgp-list-keyids
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-15 13:03:50 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-15 13:03:50 -0400
commit61fc766d07e5252b9618c6548ea714649ab54a54 (patch)
tree38b7b8bd1057269ca40f2e63d570abbe3864ca02 /bin/pgp-list-keyids
parent30b47ce9573dde234210ea9e0d1606ee5104b96e (diff)
Pull tool configuration into a hackers-git.yml
Diffstat (limited to 'bin/pgp-list-keyids')
-rwxr-xr-xbin/pgp-list-keyids15
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"]}"