mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 13:16:28 +08:00
12 lines
275 B
Ruby
12 lines
275 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
Canaid::Permissions.register_for(Step) do
|
||
|
can :manage_step do |user, step|
|
||
|
if step.my_module
|
||
|
can_manage_my_module_steps?(user, step.my_module)
|
||
|
else
|
||
|
can_manage_protocol_in_repository?(user, step.protocol)
|
||
|
end
|
||
|
end
|
||
|
end
|