Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ff92f865
Commit
ff92f865
authored
Jan 10, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ability check to its own method
parent
e0177d23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
app/finders/sentry_issues_finder.rb
app/finders/sentry_issues_finder.rb
+7
-1
No files found.
app/finders/sentry_issues_finder.rb
View file @
ff92f865
...
...
@@ -7,7 +7,7 @@ class SentryIssuesFinder
end
def
find_by_identifier
(
identifier
)
return
unless
Ability
.
allowed?
(
@current_user
,
:read_sentry_issue
,
@project
)
return
unless
authorized?
sentry_issue
=
SentryIssue
.
for_identifier
(
identifier
).
first
...
...
@@ -15,4 +15,10 @@ class SentryIssuesFinder
sentry_issue
end
private
def
authorized?
Ability
.
allowed?
(
@current_user
,
:read_sentry_issue
,
@project
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment