summaryrefslogtreecommitdiff
path: root/app/controllers/labels_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/labels_controller.rb')
-rw-r--r--app/controllers/labels_controller.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/controllers/labels_controller.rb b/app/controllers/labels_controller.rb
new file mode 100644
index 00000000000..f52fc2d8180
--- /dev/null
+++ b/app/controllers/labels_controller.rb
@@ -0,0 +1,25 @@
+class LabelsController < ApplicationController
+ before_filter :authenticate_user!
+ before_filter :project
+ before_filter :module_enabled
+
+ layout "project"
+
+ # Authorize
+ before_filter :add_project_abilities
+
+ # Allow read any issue
+ before_filter :authorize_read_issue!
+
+ respond_to :js, :html
+
+ def index
+ @labels = Issue.tag_counts_on(:labels)
+ end
+
+ protected
+
+ def module_enabled
+ return render_404 unless @project.issues_enabled
+ end
+end