summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorCamil Staps <info@camilstaps.nl>2019-01-25 21:53:00 +0100
committerCamil Staps <info@camilstaps.nl>2019-08-07 20:49:13 +0200
commit59976090b52d401dc4d23b726b2168186524f269 (patch)
tree503fb6f0563c866ea1776be3f5ad6bf88672ae92 /app/controllers
parent5b20df0a9276bc1250dc8b307adb161b24d9c255 (diff)
downloadgitlab-ce-59976090b52d401dc4d23b726b2168186524f269.tar.gz
Add /starrers view for projects
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/starrers_controller.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb
new file mode 100644
index 00000000000..8d5ddd51e4c
--- /dev/null
+++ b/app/controllers/projects/starrers_controller.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class Projects::StarrersController < Projects::ApplicationController
+ include SortingHelper
+ #
+ # Authorize
+ before_action :require_non_empty_project
+
+ def index
+ @sort = params[:sort].presence || sort_value_name
+
+ params[:has_starred] = @project
+
+ @starrers = UsersFinder.new(current_user, params).execute
+ @starrers = @starrers.sort_by_attribute(@sort)
+ end
+end