mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-21 22:33:13 +08:00
Fix experiment moving with archived tasks [SCI-6291]
This commit is contained in:
parent
5a7d285264
commit
774aa6cf9c
2 changed files with 5 additions and 1 deletions
|
@ -35,6 +35,10 @@ Canaid::Permissions.register_for(MyModule) do
|
|||
!my_module.archived? && my_module.permission_granted?(user, MyModulePermissions::MANAGE)
|
||||
end
|
||||
|
||||
can :move_my_module do |user, my_module|
|
||||
my_module.permission_granted?(user, MyModulePermissions::MANAGE)
|
||||
end
|
||||
|
||||
can :update_my_module_start_date do |user, my_module|
|
||||
my_module.permission_granted?(user, MyModulePermissions::UPDATE_START_DATE)
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ module Experiments
|
|||
ActiveRecord::Base.transaction do
|
||||
@exp.project = @project
|
||||
@exp.my_modules.each do |my_module|
|
||||
raise unless can_manage_my_module?(@user, my_module)
|
||||
raise unless can_move_my_module?(@user, my_module)
|
||||
|
||||
sync_user_assignments(my_module)
|
||||
move_tags!(my_module)
|
||||
|
|
Loading…
Reference in a new issue