gitlab-org--gitlab-foss/app/controllers/projects/labels_controller.rb
Dmitriy Zaporozhets 8eeebf0de6
Generate labels set from issues page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-25 17:47:29 +02:00

24 lines
456 B
Ruby

class Projects::LabelsController < Projects::ApplicationController
before_filter :module_enabled
# Allow read any issue
before_filter :authorize_read_issue!
respond_to :js, :html
def index
@labels = @project.issues_labels
end
def generate
Gitlab::IssuesLabels.generate(@project)
redirect_to project_issues_path(@project)
end
protected
def module_enabled
return render_404 unless @project.issues_enabled
end
end