labels_controller.rb 440 Bytes
Newer Older
1
class LabelsController < ProjectResourceController
randx's avatar
randx committed
2
3
4
5
6
7
8
9
  before_filter :module_enabled

  # Allow read any issue
  before_filter :authorize_read_issue!

  respond_to :js, :html

  def index
10
    @labels = @project.issues_labels
randx's avatar
randx committed
11
12
  end

13
  def generate
14
    Gitlab::IssuesLabels.generate(@project)
15
16
17
18

    redirect_to project_labels_path(@project)
  end

randx's avatar
randx committed
19
20
21
22
23
24
  protected

  def module_enabled
    return render_404 unless @project.issues_enabled
  end
end