Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Project Forum
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Project Forum
Project Forum
Commits
003f3505
Verified
Commit
003f3505
authored
Jun 9, 2022
by
Martin Mladenov
Browse files
Options
Downloads
Patches
Plain Diff
Move accessible_by check to controller
parent
9848f692
No related branches found
No related tags found
2 merge requests
!730
Project Forum Release v2.7.0 - 13-06-2022
,
!716
Resolve "Enrolment manager rights are too broad"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/admin/imports_controller.rb
+4
-0
4 additions, 0 deletions
app/controllers/admin/imports_controller.rb
app/views/admin/imports/index/_table.html.erb
+1
-1
1 addition, 1 deletion
app/views/admin/imports/index/_table.html.erb
with
5 additions
and
1 deletion
app/controllers/admin/imports_controller.rb
+
4
−
0
View file @
003f3505
...
...
@@ -95,5 +95,9 @@ module Admin
]
)
end
def
before_filtering
(
relation
)
relation
.
accessible_by
(
current_ability
)
end
end
end
This diff is collapsed.
Click to expand it.
app/views/admin/imports/index/_table.html.erb
+
1
−
1
View file @
003f3505
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment