allow me id in principal filter

The magic me value has been allowed the whole time but the equivalent id of the current user was not.
pull/8665/head
ulferts 4 years ago committed by Oliver Günther
parent 273ffebfb5
commit fee230122b
  1. 2
      app/models/queries/members/filters/principal_filter.rb
  2. 2
      spec/models/queries/members/filters/principal_filter_spec.rb

@ -35,7 +35,7 @@ class Queries::Members::Filters::PrincipalFilter < Queries::Members::Filters::Me
@allowed_values ||= begin
values = Principal
.active_or_registered
.in_visible_project
.in_visible_project_or_me
.map { |s| [s.name, s.id.to_s] }
.sort

@ -45,7 +45,7 @@ describe Queries::Members::Filters::PrincipalFilter, type: :model do
.and_return(principal_scope)
allow(principal_scope)
.to receive(:in_visible_project)
.to receive(:in_visible_project_or_me)
.and_return([user, group, current_user])
end

Loading…
Cancel
Save