gitlab-org--gitlab-foss/app/controllers/labels_controller.rb

25 lines
440 B
Ruby
Raw Normal View History

class LabelsController < ProjectResourceController
2012-08-24 06:05:40 -04:00
before_filter :module_enabled
# Allow read any issue
before_filter :authorize_read_issue!
respond_to :js, :html
def index
@labels = @project.issues_labels
2012-08-24 06:05:40 -04:00
end
def generate
Gitlab::IssuesLabels.generate(@project)
redirect_to project_labels_path(@project)
end
2012-08-24 06:05:40 -04:00
protected
def module_enabled
return render_404 unless @project.issues_enabled
end
end