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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
d3bdd3ba
Commit
d3bdd3ba
authored
Oct 27, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not filter out issues and merge requests related to user right away.
parent
5e017a45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
app/finders/issuable_finder.rb
app/finders/issuable_finder.rb
+5
-1
No files found.
app/finders/issuable_finder.rb
View file @
d3bdd3ba
...
@@ -48,7 +48,7 @@ class IssuableFinder
...
@@ -48,7 +48,7 @@ class IssuableFinder
else
else
[]
[]
end
end
elsif
current_user
&&
params
[
:authorized_only
].
presence
elsif
current_user
&&
params
[
:authorized_only
].
presence
&&
!
current_user_related?
klass
.
of_projects
(
current_user
.
authorized_projects
).
references
(
:project
)
klass
.
of_projects
(
current_user
.
authorized_projects
).
references
(
:project
)
else
else
klass
.
of_projects
(
ProjectsFinder
.
new
.
execute
(
current_user
)).
references
(
:project
)
klass
.
of_projects
(
ProjectsFinder
.
new
.
execute
(
current_user
)).
references
(
:project
)
...
@@ -142,4 +142,8 @@ class IssuableFinder
...
@@ -142,4 +142,8 @@ class IssuableFinder
def
project
def
project
Project
.
where
(
id:
params
[
:project_id
]).
first
if
params
[
:project_id
].
present?
Project
.
where
(
id:
params
[
:project_id
]).
first
if
params
[
:project_id
].
present?
end
end
def
current_user_related?
params
[
:scope
]
==
'created-by-me'
||
params
[
:scope
]
==
'authored'
||
params
[
:scope
]
==
'assigned-to-me'
end
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