admin查看course和user列表

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2015-01-27 15:11:24 +08:00
parent 36ec204f40
commit 00c0ddc600
2 changed files with 3 additions and 3 deletions

View File

@ -622,7 +622,8 @@ class CoursesController < ApplicationController
end end
def index def index
render_404 render_404 unless User.current.admin?
@course_type = params[:course_type] @course_type = params[:course_type]
@school_id = params[:school_id] @school_id = params[:school_id]
per_page_option = 10 per_page_option = 10

View File

@ -358,8 +358,7 @@ class UsersController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { format.html {
@groups = Group.all.sort @groups = Group.all.sort
# render :layout => @user_base_tag User.current.admin? ? (render :layout => @user_base_tag) : (render_404)
render_404
} }
format.api format.api
end end