summaryrefslogtreecommitdiff
path: root/app/models/key.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/key.rb')
-rw-r--r--app/models/key.rb9
1 files changed, 0 insertions, 9 deletions
diff --git a/app/models/key.rb b/app/models/key.rb
index edb0bcd61fd..53eee511e13 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -21,7 +21,6 @@ class Key < ActiveRecord::Base
attr_accessible :key, :title
before_validation :strip_white_space
- before_save :set_identifier
validates :title, presence: true, length: { within: 0..255 }
validates :key, presence: true, length: { within: 0..5000 }, format: { :with => /ssh-.{3} / }, uniqueness: true
@@ -48,14 +47,6 @@ class Key < ActiveRecord::Base
errors.add(:key, "can't be fingerprinted") if $?.exitstatus != 0
end
- def set_identifier
- if is_deploy_key
- self.identifier = "deploy_#{Digest::MD5.hexdigest(key)}"
- else
- self.identifier = "#{user.identifier}_#{Time.now.to_i}"
- end
- end
-
def is_deploy_key
!!project_id
end