admin查看course和user列表
Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
parent
36ec204f40
commit
00c0ddc600
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue