|  |  | @ -34,10 +34,11 @@ class ApplicationController < ActionController::Base | 
			
		
	
		
		
			
				
					
					|  |  |  | 		User.current.admin? || User.current.business? |  |  |  | 		User.current.admin? || User.current.business? | 
			
		
	
		
		
			
				
					
					|  |  |  | 	end |  |  |  | 	end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	# 访问课堂时没权限直接弹加入课堂的弹框 :409 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	def user_course_identity |  |  |  | 	def user_course_identity | 
			
		
	
		
		
			
				
					
					|  |  |  | 		@user_course_identity = current_user.course_identity(@course) |  |  |  | 		@user_course_identity = current_user.course_identity(@course) | 
			
		
	
		
		
			
				
					
					|  |  |  | 		if @user_course_identity > Course::STUDENT && @course.is_public == 0 |  |  |  | 		if @user_course_identity > Course::STUDENT && @course.is_public == 0 | 
			
		
	
		
		
			
				
					
					|  |  |  | 			tip_exception(403, "您没有权限进入") |  |  |  | 			tip_exception(409, "您没有权限进入") | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		end |  |  |  | 		end | 
			
		
	
		
		
			
				
					
					|  |  |  | 		uid_logger("###############user_course_identity:#{@user_course_identity}") |  |  |  | 		uid_logger("###############user_course_identity:#{@user_course_identity}") | 
			
		
	
		
		
			
				
					
					|  |  |  | 	end |  |  |  | 	end | 
			
		
	
	
		
		
			
				
					|  |  | 
 |