复制权限修改
This commit is contained in:
parent
3ec5a7991f
commit
76cd81ec8e
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
<% end %>
|
||||
<a href="javascript:void(0);" class="fr shixun-task-ban-btn mr15">已关闭</a>
|
||||
<% 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" %>
|
||||
<a href="javascript:void(0);" onclick="op_confirm_box_loading('<%= copy_shixun_path(@shixun) %>', '复制将在后台执行</br>平台将为你创建一个新的同名实训和内容,请问是否继续?');" class = "fr shixun-task-btn task-btn-green mr15">复制</a>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Reference in New Issue