current_user判空
This commit is contained in:
parent
a0f01469a0
commit
a7f1026828
|
@ -345,7 +345,7 @@ class CoursesService
|
|||
def course_dynamic(params,current_user)
|
||||
|
||||
@user = User.find(params[:id])
|
||||
if !current_user.admin? && !@user.active?
|
||||
if current_user.nil? && !current_user.admin? && !@user.active?
|
||||
raise '404'
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue