mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +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
|
||||
|
||||
# module: assign/unassign sample
|
||||
# NOTE: Use 'module_page? &&' before calling this permission!
|
||||
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
|
||||
|
||||
# module: complete/uncomplete
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
</button>
|
||||
<% 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"
|
||||
id="assignSamples" onclick="$(this).next().click();" disabled>
|
||||
<span class="glyphicon glyphicon-ok-circle"></span>
|
||||
|
|
Loading…
Reference in a new issue