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
def index
render_404
render_404 unless User.current.admin?
@course_type = params[:course_type]
@school_id = params[:school_id]
per_page_option = 10

View File

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