diff --git a/app/views/layouts/_course_base_info.html.erb b/app/views/layouts/_course_base_info.html.erb index 04162fc9c..d364f84e1 100644 --- a/app/views/layouts/_course_base_info.html.erb +++ b/app/views/layouts/_course_base_info.html.erb @@ -28,7 +28,15 @@ <%= image_tag(url_to_avatar(@course), :width => "110", :height => "110", :alt => "班级logo") %>
-

邀请码
<%=@course.generate_invite_code %>

+

邀请码
+ + <% if User.current.admin? || User.current.member_of_course?(@course) %> + <%=@course.generate_invite_code %> + <% else %> + ***** + <% end %> + +