diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index a96bc0fbe..aa216d755 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -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