diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-16 14:21:44 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-16 14:21:44 +0100 |
commit | 4657c28777dfc2729261f895f8e36cbef51395bc (patch) | |
tree | 86c2483e843be06ad10c0f0b43f6a20da3a5a6b8 /lib/api/internal.rb | |
parent | 5456859b5b28baca95ced74179a349563498a5f0 (diff) | |
parent | daaaf5ef9f182761ac07d76d24d971765134c7e1 (diff) | |
download | gitlab-ce-fix/keep-artifacts-button-visibility.tar.gz |
Merge branch 'master' into fix/keep-artifacts-button-visibilityfix/keep-artifacts-button-visibility
* master: (579 commits)
Conflicts:
spec/models/build_spec.rb
Diffstat (limited to 'lib/api/internal.rb')
-rw-r--r-- | lib/api/internal.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index db2d18f935d..d235977fbd8 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -28,6 +28,8 @@ module API protocol = params[:protocol] + actor.update_last_used_at if actor.is_a?(Key) + access = if wiki? Gitlab::GitAccessWiki.new(actor, project, protocol, authentication_abilities: ssh_authentication_abilities) @@ -61,6 +63,8 @@ module API status 200 key = Key.find(params[:key_id]) + key.update_last_used_at + token_handler = Gitlab::LfsToken.new(key) { @@ -103,7 +107,9 @@ module API key = Key.find_by(id: params[:key_id]) - unless key + if key + key.update_last_used_at + else return { 'success' => false, 'message' => 'Could not find the given key' } end |