非项目成员URL访问私有项目500问题

This commit is contained in:
huang 2015-06-19 10:21:42 +08:00
parent 64da95e900
commit 7f0da03fea
1 changed files with 3 additions and 4 deletions

View File

@ -457,7 +457,6 @@ class ProjectsController < ApplicationController
end
end
@members = paginateHelper @members
render :layout => 'base_courses' if @project.project_type == 1
end
#判断指定用户是否为课程教师
@ -676,9 +675,9 @@ class ProjectsController < ApplicationController
def memberAccess
# 是课程,则判断当前用户是否参加了课程
return 0 if @project.project_type == Project::ProjectType_project
currentUser = User.current
render_403 unless currentUser.member_of?(@project)
# return 0 if @project.project_type == Project::ProjectType_project
# currentUser = User.current
render_403 unless User.current.member_of?(@project)
end
def toggleCourse