Skip to content
Snippets Groups Projects
Verified Commit 003f3505 authored by Martin Mladenov's avatar Martin Mladenov
Browse files

Move accessible_by check to controller

parent 9848f692
No related branches found
No related tags found
2 merge requests!730Project Forum Release v2.7.0 - 13-06-2022,!716Resolve "Enrolment manager rights are too broad"
......@@ -95,5 +95,9 @@ module Admin
]
)
end
def before_filtering(relation)
relation.accessible_by(current_ability)
end
end
end
......@@ -7,7 +7,7 @@
</tr>
</thead>
<tbody>
<% @imports.accessible_by(current_ability).each do |import| %>
<% @imports.each do |import| %>
<%= table_row_link_to admin_import_path(import) do %>
<td><%= import.id %></td>
<td><strong><%= import.display_name %></strong></td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment