mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-09 05:18:01 +08:00
Fixed permission error when accessing samples page.
This commit is contained in:
parent
4c87fb4a55
commit
f21c794a95
2 changed files with 3 additions and 3 deletions
|
@ -72,9 +72,9 @@ Canaid::Permissions.register_for(MyModule) do
|
||||||
end
|
end
|
||||||
|
|
||||||
# module: assign/unassign sample
|
# module: assign/unassign sample
|
||||||
|
# NOTE: Use 'module_page? &&' before calling this permission!
|
||||||
can :assign_sample_to_module do |user, my_module|
|
can :assign_sample_to_module do |user, my_module|
|
||||||
module_page? &&
|
user.is_technician_or_higher_of_project?(my_module.experiment.project)
|
||||||
user.is_technician_or_higher_of_project?(my_module.experiment.project)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# module: complete/uncomplete
|
# module: complete/uncomplete
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
</button>
|
</button>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if can_assign_sample_to_module?(@my_module) %>
|
<% if module_page? && can_assign_sample_to_module?(@my_module) %>
|
||||||
<button type="button" class="btn btn-default"
|
<button type="button" class="btn btn-default"
|
||||||
id="assignSamples" onclick="$(this).next().click();" disabled>
|
id="assignSamples" onclick="$(this).next().click();" disabled>
|
||||||
<span class="glyphicon glyphicon-ok-circle"></span>
|
<span class="glyphicon glyphicon-ok-circle"></span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue