diff options
author | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-06-19 20:17:34 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-08-04 15:33:18 +0300 |
commit | 4ccd767abf45df909c43e93d8898096236c99e3d (patch) | |
tree | 3cf46a9dd0d7db5c7a2abb9759a9b39e3fe90277 /app/models/key.rb | |
parent | 58c76605b31f56c8a2dff9381feae859bedb2076 (diff) |
Only publish ssh key-type and key
Diffstat (limited to 'app/models/key.rb')
-rw-r--r-- | app/models/key.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/key.rb b/app/models/key.rb index 2dcae059c0e..406a1257b5d 100644 --- a/app/models/key.rb +++ b/app/models/key.rb @@ -39,6 +39,11 @@ class Key < ActiveRecord::Base self.key = key.strip unless key.blank? end + def publishable_key + #Removes anything beyond the keytype and key itself + self.key.split[0..1].join(' ') + end + # projects that has this key def projects user.authorized_projects |