diff options
author | Rubén Dávila <ruben@gitlab.com> | 2017-09-30 01:55:36 +0300 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2017-10-05 16:25:27 +0300 |
commit | c50725fecfb776d56c95ef070940ca6c85786ecf (patch) | |
tree | 86695f75d9f3ef3595ed1970ccb960898098cba7 /app/models/gpg_key.rb | |
parent | c2c35ae7971d19396078bdec6474fdd58f66000c (diff) |
Address feedback from last code review
Diffstat (limited to 'app/models/gpg_key.rb')
-rw-r--r-- | app/models/gpg_key.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/gpg_key.rb b/app/models/gpg_key.rb index 0ddf1245dd1..27513f4b03f 100644 --- a/app/models/gpg_key.rb +++ b/app/models/gpg_key.rb @@ -44,6 +44,7 @@ class GpgKey < ActiveRecord::Base def primary_keyid super&.upcase end + alias_method :keyid, :primary_keyid def fingerprint super&.upcase @@ -53,6 +54,10 @@ class GpgKey < ActiveRecord::Base super(value&.strip) end + def keyids + [keyid].concat(subkeys.map(&:keyid)) + end + def user_infos @user_infos ||= Gitlab::Gpg.user_infos_from_key(key) end |