Fix permission check for experiment moving (#3783)

Co-authored-by: Anton <anton@scinote.net>
This commit is contained in:
aignatov-bio 2022-01-18 10:15:59 +01:00 committed by GitHub
parent 10556ea960
commit 7425225520
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ Canaid::Permissions.register_for(Experiment) do
end
can :manage_all_experiment_my_modules do |user, experiment|
experiment.my_modules == experiment.my_modules.managable_by_user(user)
experiment.my_modules.where.not(id: experiment.my_modules.managable_by_user(user)).none?
end
can :archive_experiment do |user, experiment|