diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 3dd01f27c..be7308a49 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -546,6 +546,10 @@ class ShixunsController < ApplicationController end def copy + unless (@shixun.can_copy && User.current.user_extensions.try(:identity) == 1 && User.current.professional_certification) + render_403 + return + end ActiveRecord::Base.transaction do begin new_shixun = Shixun.new diff --git a/app/views/shixuns/_shixun_top.html.erb b/app/views/shixuns/_shixun_top.html.erb index 1c8c75159..9c7b2384b 100644 --- a/app/views/shixuns/_shixun_top.html.erb +++ b/app/views/shixuns/_shixun_top.html.erb @@ -35,7 +35,7 @@ <% end %> 已关闭 <% end %> - <% if @shixun.can_copy %> + <% if @shixun.can_copy && User.current.user_extensions.try(:identity) == 1 && User.current.professional_certification %> <%#= link_to "复制", copy_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-green mr15" %> 复制 <% end %>