mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-12 06:06:05 +10:00
Added visibility_level icons to project view (rather than just text). Added public projects to search results. Added ability to restrict visibility levels standard users can set.
14 lines
507 B
Ruby
14 lines
507 B
Ruby
class Public::ProjectsController < ApplicationController
|
|
skip_before_filter :authenticate_user!,
|
|
:reject_blocked, :set_current_user_for_observers,
|
|
:add_abilities
|
|
|
|
layout 'public'
|
|
|
|
def index
|
|
@projects = Project.public_or_internal_only(current_user)
|
|
@projects = @projects.search(params[:search]) if params[:search].present?
|
|
@projects = @projects.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page]).per(20)
|
|
end
|
|
end
|