diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2019-05-29 16:47:40 +0300 |
---|---|---|
committer | Denys Mishunov <dmishunov@gitlab.com> | 2019-05-31 17:13:53 +0300 |
commit | 6e83a31f3388d2d1abadcc4775a168db35892e2c (patch) | |
tree | 82f3eaa37b2832a9164c0589272c322bd3087be5 /app/models/key.rb | |
parent | be01c431423eaba1e9aefdca77eb9ac5c054e6ad (diff) |
Resolved EE differences in app/views/profiles/keys
**How?**
It creates a base method `can_delete?` on Key
which will always be true in CE and is overridden in EE.
Added changelog entry
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 b097be8cc89..8aa25924c28 100644 --- a/app/models/key.rb +++ b/app/models/key.rb @@ -59,6 +59,11 @@ class Key < ApplicationRecord "key-#{id}" end + # EE overrides this + def can_delete? + true + end + # rubocop: disable CodeReuse/ServiceClass def update_last_used_at Keys::LastUsedService.new(self).execute |