Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-17 14:59:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-17 14:59:07 +0300
commit8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch)
tree544930fb309b30317ae9797a9683768705d664c4 /app/controllers/users_controller.rb
parent4b1de649d0168371549608993deac953eb692019 (diff)
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 05573255066..46245286820 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -33,18 +33,36 @@ class UsersController < ApplicationController
end
format.json do
+ # In 13.8, this endpoint will be removed:
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/289972
load_events
pager_json("events/_events", @events.count, events: @events)
end
end
end
+ # Get all keys of a user(params[:username]) in a text format
+ # Helpful for sysadmins to put in respective servers
+ def ssh_keys
+ render plain: user.all_ssh_keys.join("\n")
+ end
+
def activity
respond_to do |format|
format.html { render 'show' }
+
+ format.json do
+ load_events
+ pager_json("events/_events", @events.count, events: @events)
+ end
end
end
+ # Get all gpg keys of a user(params[:username]) in a text format
+ def gpg_keys
+ render plain: user.gpg_keys.select(&:verified?).map(&:key).join("\n")
+ end
+
def groups
load_groups