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
71cc0c4c
Commit
71cc0c4c
authored
Jun 05, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove authorized_only param not allowing public projects listing
parent
66705ad6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
app/services/issue_links/list_service.rb
app/services/issue_links/list_service.rb
+1
-1
spec/services/issue_links/list_service_spec.rb
spec/services/issue_links/list_service_spec.rb
+15
-2
No files found.
app/services/issue_links/list_service.rb
View file @
71cc0c4c
...
...
@@ -25,7 +25,7 @@ module IssueLinks
def
issues
authorized_issues
=
IssuesFinder
.
new
(
@current_user
,
authorized_only:
true
,
feature_availability_check:
false
)
.
new
(
@current_user
,
feature_availability_check:
false
)
.
execute
.
reorder
(
nil
)
...
...
spec/services/issue_links/list_service_spec.rb
View file @
71cc0c4c
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
IssueLinks
::
ListService
,
service:
true
do
let
(
:user
)
{
create
:user
}
let
(
:project
)
{
create
(
:project_empty_repo
)
}
let
(
:project
)
{
create
(
:project_empty_repo
,
:private
)
}
let
(
:issue
)
{
create
:issue
,
project:
project
}
let
(
:user_role
)
{
:developer
}
...
...
@@ -38,7 +38,7 @@ describe IssueLinks::ListService, service: true do
it
'verifies number of queries'
do
recorded
=
ActiveRecord
::
QueryRecorder
.
new
{
subject
}
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
3
5
)
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
3
7
)
end
it
'returns related issues JSON'
do
...
...
@@ -73,6 +73,19 @@ describe IssueLinks::ListService, service: true do
end
end
context
'referencing a public project issue'
do
let
(
:public_project
)
{
create
:empty_project
,
:public
}
let
(
:issue_b
)
{
create
:issue
,
project:
public_project
}
let!
(
:issue_link
)
do
create
(
:issue_link
,
source:
issue
,
target:
issue_b
)
end
it
'presents issue'
do
expect
(
subject
.
size
).
to
eq
(
1
)
end
end
context
'referencing issue with removed relationships'
do
context
'when referenced a deleted issue'
do
let
(
:issue_b
)
{
create
:issue
,
project:
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