diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2017-04-27 16:40:27 -0400 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2017-04-27 16:40:27 -0400 |
commit | 57f8be4e69acea24456758d2888e0f703a2dfba9 (patch) | |
tree | dacb22153c3e72321161ebf2e5fc438e1e942a95 /app/presenters | |
parent | 5976195fef53fe1bc56647dfc06049a8f984d5fe (diff) | |
parent | 703df2881bb137a79284baafe2cc12ff32ab9ff5 (diff) | |
download | gitlab-ce-57f8be4e69acea24456758d2888e0f703a2dfba9.tar.gz |
Merge remote-tracking branch 'origin/29667-deploy-keys' into deploy-keys-load-async
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/projects/settings/deploy_keys_presenter.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/presenters/projects/settings/deploy_keys_presenter.rb b/app/presenters/projects/settings/deploy_keys_presenter.rb index 86ac513b3c0..070b0c35e36 100644 --- a/app/presenters/projects/settings/deploy_keys_presenter.rb +++ b/app/presenters/projects/settings/deploy_keys_presenter.rb @@ -48,6 +48,17 @@ module Projects available_public_keys.any? end + def as_json + serializer = DeployKeySerializer.new + opts = { user: current_user } + + { + enabled_keys: serializer.represent(enabled_keys, opts), + available_project_keys: serializer.represent(available_project_keys, opts), + public_keys: serializer.represent(available_public_keys, opts) + } + end + def to_partial_path 'projects/deploy_keys/index' end |