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
5ce21aa2
Commit
5ce21aa2
authored
May 28, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor project_id improvements to IssuableFinder::Params
parent
8fc733e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
app/finders/issuable_finder/params.rb
app/finders/issuable_finder/params.rb
+7
-3
No files found.
app/finders/issuable_finder/params.rb
View file @
5ce21aa2
...
...
@@ -105,7 +105,7 @@ class IssuableFinder
end
def
project?
p
arams
[
:project_id
]
.
present?
p
roject_id
.
present?
end
def
group
...
...
@@ -132,15 +132,19 @@ class IssuableFinder
def
project
strong_memoize
(
:project
)
do
next
nil
unless
p
arams
[
:project_id
].
presen
t?
next
nil
unless
p
rojec
t?
project
=
Project
.
find
(
params
[
:project_id
]
)
project
=
project_id
.
is_a?
(
Project
)
?
project_id
:
Project
.
find
(
project_id
)
project
=
nil
unless
Ability
.
allowed?
(
current_user
,
:"read_
#{
klass
.
to_ability_name
}
"
,
project
)
project
end
end
def
project_id
params
[
:project_id
]
end
def
projects
strong_memoize
(
:projects
)
do
next
[
project
]
if
project?
...
...
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