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
f5e8337c
Commit
f5e8337c
authored
Nov 29, 2016
by
Semyon Pupkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not raise error in AutocompleteController#users when not authorized
https://gitlab.com/gitlab-org/gitlab-ce/issues/25031
parent
4a3a4131
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
app/controllers/autocomplete_controller.rb
app/controllers/autocomplete_controller.rb
+1
-1
changelogs/unreleased/25031-do-not-raise-error-in-autocomplete.yml
...s/unreleased/25031-do-not-raise-error-in-autocomplete.yml
+4
-0
spec/controllers/autocomplete_controller_spec.rb
spec/controllers/autocomplete_controller_spec.rb
+9
-0
No files found.
app/controllers/autocomplete_controller.rb
View file @
f5e8337c
...
...
@@ -11,7 +11,7 @@ class AutocompleteController < ApplicationController
@users
=
@users
.
reorder
(
:name
)
@users
=
@users
.
page
(
params
[
:page
])
if
params
[
:todo_filter
].
present?
if
params
[
:todo_filter
].
present?
&&
current_user
@users
=
@users
.
todo_authors
(
current_user
.
id
,
params
[
:todo_state_filter
])
end
...
...
changelogs/unreleased/25031-do-not-raise-error-in-autocomplete.yml
0 → 100644
View file @
f5e8337c
---
title
:
Do not raise error in AutocompleteController#users when not authorized
merge_request
:
7817
author
:
Semyon Pupkov
spec/controllers/autocomplete_controller_spec.rb
View file @
f5e8337c
...
...
@@ -144,6 +144,15 @@ describe AutocompleteController do
it
{
expect
(
body
).
to
be_kind_of
(
Array
)
}
it
{
expect
(
body
.
size
).
to
eq
0
}
end
describe
'GET #users with todo filter'
do
it
'gives an array of users'
do
get
:users
,
todo_filter:
true
expect
(
response
.
status
).
to
eq
200
expect
(
body
).
to
be_kind_of
(
Array
)
end
end
end
context
'author of issuable included'
do
...
...
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