Commit ff92f865 authored by Sean Arnold's avatar Sean Arnold

Move ability check to its own method

parent e0177d23
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment