Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-10 17:04:52 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-10 17:04:52 +0400
commit56f989e53e80fe7545a3400ba7ee98a0cd2cf259 (patch)
treee43d7b724b373969ce0dfa9a59c1c447352f8d95 /app/services
parent5a098e84e4de30d95ba5e0a3a7bbd81813cf3305 (diff)
Fix wrong issues appears at Dashboard#issues page
Filtering service used klass instead of passed items. Because of this you see list of all issues intead of authorized ones. This commit fixes it so people see only issues they are authorized to see. Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/services')
-rw-r--r--app/services/filtering_service.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/filtering_service.rb b/app/services/filtering_service.rb
index ebd394ee758..52537f7ba4f 100644
--- a/app/services/filtering_service.rb
+++ b/app/services/filtering_service.rb
@@ -57,11 +57,11 @@ class FilteringService
def by_scope(items)
case params[:scope]
when 'created-by-me', 'authored' then
- klass.where(author_id: current_user.id)
+ items.where(author_id: current_user.id)
when 'all' then
- klass
+ items
when 'assigned-to-me' then
- klass.where(assignee_id: current_user.id)
+ items.where(assignee_id: current_user.id)
else
raise 'You must specify default scope'
end