diff options
| author | randx <dmitriy.zaporozhets@gmail.com> | 2012-08-29 00:04:06 +0300 |
|---|---|---|
| committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-08-29 00:04:06 +0300 |
| commit | 7cdc5b9e0438c35c83fce739a764cb146d20c004 (patch) | |
| tree | 42cfe847873dee51c54d32c81a8543c2d75fce50 /app/models/key.rb | |
| parent | aded7056fd3a9830215f41233ef609c0f9a3b862 (diff) | |
| download | gitlab-ce-7cdc5b9e0438c35c83fce739a764cb146d20c004.tar.gz | |
Use similar interface to access gitolite
Simplified gitolite handle logic
Stubn over monkeypatch
Stub only specific methods in Gitlab:Gitolite
Moved grach auth to lib
added specs for keys observer
removes SshKey role
Diffstat (limited to 'app/models/key.rb')
| -rw-r--r-- | app/models/key.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/key.rb b/app/models/key.rb index cfcb1f63c26..8b61675a444 100644 --- a/app/models/key.rb +++ b/app/models/key.rb @@ -1,7 +1,6 @@ require 'digest/md5' class Key < ActiveRecord::Base - include SshKey belongs_to :user belongs_to :project @@ -50,6 +49,10 @@ class Key < ActiveRecord::Base user.projects end end + + def last_deploy? + Key.where(identifier: identifier).count == 0 + end end # == Schema Information # |
